Exemplo n.º 1
0
    public void SpawnScene()
    {
        CleanupTemp();

        var resPath = RefUtils.ConvertAssetPathToResPath(spawnScene, "");

        var prefab = ResourceManager.Load <GameObject>(resPath, ResourceManager.EXT_PREFAB);

        var go = Instantiate(prefab);

        go.name = "Level";

        NotEditableTransform(go);

        var items = ResourceManager.Load <TextAsset>(RefUtils.ConvertAssetPathToResPath(spawnScene.Replace("level.prefab", "entities.json"), ""), ResourceManager.EXT_SCRIPT);

        foreach (var goEnt in Game.LoadItems("", items.text))
        {
            NotEditableTransform(goEnt);
        }
    }
Exemplo n.º 2
0
 private void Cleanup()
 {
     RefUtils.Dispose(ref _cleanup);
 }
 public void Dispose()
 {
     RefUtils.Dispose(ref _cleanup);
 }