命名空间迁移
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -8,6 +8,27 @@ using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
namespace ConfigType
|
||||
{
|
||||
// SubWorld 配置
|
||||
public class SubWorldConfig : ScriptLoadableConfig
|
||||
{
|
||||
public string project;
|
||||
|
||||
public override void Deserialize(BinaryReader reader)
|
||||
{
|
||||
project = BinarySerializeUtility.ReadString(reader);
|
||||
base.Deserialize(reader);
|
||||
}
|
||||
|
||||
public override void Serialize(BinaryWriter writer)
|
||||
{
|
||||
BinarySerializeUtility.WriteString(writer, project);
|
||||
base.Serialize(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Scriptable]
|
||||
public class SubWorld : ScriptableObject
|
||||
{
|
||||
@@ -25,7 +46,7 @@ namespace Demo.Game
|
||||
var ir = SceneManager.LoadSceneAsync(Editor.EditorController.SceneName, LoadSceneMode.Additive);
|
||||
ir.completed += x =>
|
||||
{
|
||||
SubWorldGameController = (from controller in FindObjectsOfType<GameController>()
|
||||
SubWorldGameController = (from controller in FindObjectsByType<GameController>(FindObjectsSortMode.None)
|
||||
where controller.RootSourcePath == project
|
||||
select controller).First();
|
||||
ConventionUtility.StartCoroutine(SubWorldGameController.GameInitBySubWorld(GetRoot().InputCatch));
|
||||
@@ -48,4 +69,4 @@ namespace Demo.Game
|
||||
this.project = project;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user