UnityEditor.TerrainInspector.ShowUpgradeTreePrototypeScaleUI C# (CSharp) Méthode

ShowUpgradeTreePrototypeScaleUI() public méthode

public ShowUpgradeTreePrototypeScaleUI ( ) : void
Résultat void
        public void ShowUpgradeTreePrototypeScaleUI()
        {
            if ((this.m_Terrain.terrainData != null) && this.m_Terrain.terrainData.NeedUpgradeScaledTreePrototypes())
            {
                GUIContent content = EditorGUIUtility.TempContent("Some of your prototypes have scaling values on the prefab. Since Unity 5.2 these scalings will be applied to terrain tree instances. Do you want to upgrade to this behaviour?", EditorGUIUtility.GetHelpIcon(MessageType.Warning));
                GUILayout.BeginVertical(EditorStyles.helpBox, new GUILayoutOption[0]);
                GUILayout.Label(content, EditorStyles.wordWrappedLabel, new GUILayoutOption[0]);
                GUILayout.Space(3f);
                GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.ExpandWidth(false) };
                if (GUILayout.Button("Upgrade", options))
                {
                    this.m_Terrain.terrainData.UpgradeScaledTreePrototype();
                    TerrainMenus.RefreshPrototypes();
                }
                GUILayout.Space(3f);
                GUILayout.EndVertical();
            }
        }