Пример #1
0
        private void Start()
        {
            envHider   = new EnvironmentHider();
            matSwapper = new MaterialSwapper();
            matSwapper.GetMaterials();

            CreateAllPlatforms();

            // Retrieve saved path from player prefs if it exists
            if (PlayerPrefs.HasKey("CustomPlatformPath"))
            {
                string savedPath = PlayerPrefs.GetString("CustomPlatformPath");
                // Check if this path was loaded and update our platform index
                for (int i = 0; i < bundlePaths.Count; i++)
                {
                    if (savedPath == bundlePaths.ElementAt(i))
                    {
                        platformIndex = i;
                    }
                }
            }

            PlatformUI.OnLoad();
            if (platforms.ElementAt(platformIndex) != null)
            {
                // Find environment parts after scene change
                envHider.FindEnvironment();

                envHider.HideObjectsForPlatform(platforms.ElementAt(platformIndex));
            }
        }
Пример #2
0
        private void Start()
        {
            envHider   = new EnvironmentHider();
            matSwapper = new MaterialSwapper();
            matSwapper.GetMaterials();

            CreateAllPlatforms();

            // Retrieve saved path from player prefs if it exists
            if (PlayerPrefs.HasKey("CustomPlatformPath"))
            {
                string savedPath = PlayerPrefs.GetString("CustomPlatformPath");
                // Check if this path was loaded and update our platform index
                for (int i = 0; i < bundlePaths.Count; i++)
                {
                    if (savedPath == bundlePaths.ElementAt(i))
                    {
                        platformIndex = i;
                    }
                }
            }

            PlatformUI.OnLoad();
            if (platforms.ElementAt(platformIndex) != null)
            {
                Log("Loading platforms.");
                //Finds and hides the environment after it loads.
                StartCoroutine(envHider.WaitForAndFindEnvironment(platforms.ElementAt(platformIndex)));
            }
        }
Пример #3
0
        private void Start()
        {
            envHider   = new EnvironmentHider();
            matSwapper = new MaterialSwapper();
            matSwapper.GetMaterials();

            CreateAllPlatforms();

            // Retrieve saved path from player prefs if it exists
            if (ModPrefs.HasKey(CustomFloorPlugin.PluginName, "CustomPlatformPath"))
            {
                string savedPath = ModPrefs.GetString(CustomFloorPlugin.PluginName, "CustomPlatformPath");
                // Check if this path was loaded and update our platform index
                for (int i = 0; i < bundlePaths.Count; i++)
                {
                    if (savedPath == bundlePaths.ElementAt(i))
                    {
                        platformIndex = i;
                    }
                }
            }
            PlatformUI.OnLoad();
            HideEnvironment();
        }