コード例 #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);
                }
            });
        }
コード例 #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);
            }
        }
コード例 #3
0
 public void TestAnyPath()
 {
     DebugUtility.Log(LoggerTags.Project, FileSystem.AnyPathToResourcesPath(robotAssetPath, true));
 }