Esempio n. 1
0
        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);
                }
            });
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
 public void TestAnyPath()
 {
     DebugUtility.Log(LoggerTags.Project, FileSystem.AnyPathToResourcesPath(robotAssetPath, true));
 }