Skip to content

Commit

Permalink
Fix build error.
Browse files Browse the repository at this point in the history
  • Loading branch information
wojiuxuihuan committed Mar 23, 2024
1 parent 34baeb2 commit 9d48214
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 43 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [4.3.3]
- Fix build error.

## [4.3.2]
Update the follow pacakges:
- json-for-unity.converters:1.5.1-1.6.3
Expand Down
2 changes: 1 addition & 1 deletion ProjectConfig~/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"com.threeyes.alivecursor.sdk": "4.3.2",
"com.threeyes.alivecursor.sdk": "4.3.3",
"com.beans.deform": "1.2.1",
"com.coffee.ui-effect": "4.0.0-preview.10",
"com.dbrizov.naughtyattributes": "2.1.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
#if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Threeyes.Core;
using UnityEngine;
using UnityEngine.SceneManagement;

#if UNITY_EDITOR
using UnityEditor;
using System.IO;
using Threeyes.Core.Editor;

#endif
namespace Threeyes.Steamworks
{
public class SceneManagerSimulator : HubSceneManagerBase<SceneManagerSimulator>
Expand All @@ -27,6 +24,7 @@ protected virtual void Start()

async void InitAsync()
{
#if UNITY_EDITOR
await Task.Yield();//等待Config初始化完成

//#0 找到ModScene
Expand Down Expand Up @@ -67,7 +65,7 @@ async void InitAsync()
}
InitMod(modEntry);
hasSceneLoaded = true;
#endif
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -27,56 +27,27 @@ public static string GetItemJsonFileDir(string itemDirPath)
}

//——Asset——
/// <summary>
/// 从(内置的文件夹)中读取指定Item的SOAssetPack
///
/// 用途:
/// -Simulator
///
/// 相对于通过AD_AliveDesktop链接的好处:
/// -更加统一,不管是否为场景Mod都可以使用
///
/// Bug:
/// -【不重要】打包后如果是基于当前场景,则无法调用(可以通过AD_SOAssetPackDebugManager链接加载的方式解决)(或者把对应的SO放到Resources中)
/// </summary>
/// <param name="workshopItemInfo"></param>
/// <param name="modHost"></param>
/// <returns></returns>
// public static SOAssetPack LoadAssetPack_UnityProject(WorkshopItemInfo workshopItemInfo)
// {
// SOAssetPack soAssetPack = null;

//#if UNITY_EDITOR
// //直接从文件夹中读取
// string relatedFilePath = SOWorkshopItemInfo.GetRelatedSOAssetPackFilePath(workshopItemInfo.title);//ToUpdate:应该是先获取SOWorkshopItemInfo。然后获取其itemName(因为itemName和title不一定一致)(可以是直接传入SOWorkshopItemInfo)
// soAssetPack = AssetDatabase.LoadAssetAtPath<SOAssetPack>(relatedFilePath);
//#else
// Debug.LogError("Can't call this method at runtime!");
//#endif
// return soAssetPack;
// }

#if UNITY_EDITOR
public static TAsset LoadAsset_UnityProject<TAsset>(WorkshopItemInfo workshopItemInfo)
where TAsset : Object
{
TAsset targetAsset = null;

#if UNITY_EDITOR
//直接从文件夹中读取
string relatedFilePath = SOWorkshopItemInfo.GetRelatedSOAssetPackFilePath(workshopItemInfo.title);//ToUpdate:应该是先获取SOWorkshopItemInfo。然后获取其itemName(因为itemName和title不一定一致)(可以是直接传入SOWorkshopItemInfo)
targetAsset = AssetDatabase.LoadAssetAtPath<TAsset>(relatedFilePath);
#else
Debug.LogError("Can't call this method at runtime!");
#endif
return targetAsset;
}

public static List<TAsset> LoadAssets_UnityProject<TAsset>(WorkshopItemInfo workshopItemInfo)
where TAsset : Object
{
List<TAsset> listAsset = AssetDatabaseTool.LoadAssets<TAsset>($"t:{typeof(TAsset).Name}", new string[] { SOWorkshopItemInfo.GetRelatedItemDirPath(workshopItemInfo.title) });
List<TAsset> listAsset = new List<TAsset>();
AssetDatabaseTool.LoadAssets<TAsset>($"t:{typeof(TAsset).Name}", new string[] { SOWorkshopItemInfo.GetRelatedItemDirPath(workshopItemInfo.title) });
return listAsset;
}
#endif

//——Id——

Expand Down
4 changes: 2 additions & 2 deletions UMod/Resources/Editor/ModToolsSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ MonoBehaviour:
toolsIconSmall: {fileID: 2800000, guid: 01d03c0fabb5c7249b6605e98a09beac, type: 3}
toolsIconLarge: {fileID: 2800000, guid: 01d03c0fabb5c7249b6605e98a09beac, type: 3}
toolsName: AliveCursorSDK
toolsVersion: 4.3.2
toolsVersion: 4.3.3
firstRunWindow:
assemblyQualifiedName:
developerName: Threeyes
syncDeveloperName: 0
gameName: AliveCursor
syncGameName: 0
gameVersion: 4.3.2
gameVersion: 4.3.3
syncGameVersion: 1
modFileExtension: .umod
commandLineLaunchFormat: +mod=$PATH
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.threeyes.alivecursor.sdk",
"displayName": "AliveCursorSDK",
"version": "4.3.2",
"version": "4.3.3",
"unity": "2022.3",
"description": "SDK for AliveCursor.",
"documentationUrl": "https://github.com/Threeyes/AliveCursorSDK/wiki",
Expand Down

0 comments on commit 9d48214

Please sign in to comment.