异步加载已修复, Config更新正推动
This commit is contained in:
@@ -32,12 +32,15 @@ namespace Demo.Game
|
||||
[Scriptable]
|
||||
public class SubWorld : ScriptableObject
|
||||
{
|
||||
protected override ConfigType.ScriptLoadableConfig MakeConfig()
|
||||
{
|
||||
return new ConfigType.SubWorldConfig();
|
||||
}
|
||||
public static SubWorld Make()
|
||||
{
|
||||
return new GameObject().AddComponent<SubWorld>();
|
||||
}
|
||||
|
||||
[Content, SerializeField] private string project;
|
||||
[Content, SerializeField] private GameController SubWorldGameController;
|
||||
|
||||
protected override IEnumerator DoSomethingDuringApplyScript()
|
||||
@@ -47,7 +50,7 @@ namespace Demo.Game
|
||||
ir.completed += x =>
|
||||
{
|
||||
SubWorldGameController = (from controller in FindObjectsByType<GameController>(FindObjectsSortMode.None)
|
||||
where controller.RootSourcePath == project
|
||||
where controller.RootSourcePath == GetConfig<ConfigType.SubWorldConfig>().project
|
||||
select controller).First();
|
||||
ConventionUtility.StartCoroutine(SubWorldGameController.GameInitBySubWorld(GetRoot().InputCatch));
|
||||
};
|
||||
@@ -66,7 +69,7 @@ namespace Demo.Game
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public void Load(string project)
|
||||
{
|
||||
this.project = project;
|
||||
GetConfig<ConfigType.SubWorldConfig>().project = project;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user