private void Start() { if (string.IsNullOrEmpty(robotAssetPath)) { return; } RobotFactory.GetOrAlloc().LoadRobotFromResources(FileSystem.AnyPathToResourcesPath(robotAssetPath, true), (robot) => { if (this == null) { Destroy(robot.gameObject); } if (robot != null) { robot.transform.SetParent(transform); } }); }
private void OnEngineInitialized(IEngine engine) { DebugUtility.LogTrace(LoggerTags.Engine, "OnEngineInitialized"); var currentScene = SceneManager.GetActiveScene(); // temp code if (!string.IsNullOrEmpty(modelAssetName)) { LoadModel(FileSystem.AnyPathToResourcesPath(modelAssetName, true), true); return; } if (sceneName != currentScene.name) { SceneManager.LoadSceneAsync(sceneName, LoadSceneMode.Single); } else { SceneManager.LoadSceneAsync(1, LoadSceneMode.Single); } }
public void TestAnyPath() { DebugUtility.Log(LoggerTags.Project, FileSystem.AnyPathToResourcesPath(robotAssetPath, true)); }