Ejemplo n.º 1
0
 protected override void Init()
 {
     if (this.m_Type == null)
     {
         this.m_Type = base.GetProperty("type");
         List <SerializedProperty> list = new List <SerializedProperty>();
         for (int i = 0; i < this.m_Planes.Length; i++)
         {
             this.m_Planes[i] = base.GetProperty("plane" + i);
             if ((i == 0) || (this.m_Planes[i].objectReferenceValue != null))
             {
                 list.Add(this.m_Planes[i]);
             }
         }
         this.m_ShownPlanes             = list.ToArray();
         this.m_Dampen                  = base.GetProperty("dampen");
         this.m_Bounce                  = base.GetProperty("bounce");
         this.m_LifetimeLossOnCollision = base.GetProperty("energyLossOnCollision");
         this.m_MinKillSpeed            = base.GetProperty("minKillSpeed");
         this.m_ParticleRadius          = base.GetProperty("particleRadius");
         this.m_PlaneVisualizationType  = (PlaneVizType)EditorPrefs.GetInt("PlaneColisionVizType", 1);
         this.m_ScaleGrid               = EditorPrefs.GetFloat("ScalePlaneColision", 1f);
         this.m_CollidesWith            = base.GetProperty("collidesWith");
         this.m_Quality                 = base.GetProperty("quality");
         this.m_VoxelSize               = base.GetProperty("voxelSize");
         this.m_CollisionMessages       = base.GetProperty("collisionMessages");
         this.SyncVisualization();
     }
 }
Ejemplo n.º 2
0
 public CollisionModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "CollisionModule", displayName)
 {
     this.m_PlaneVizTypeNames = new string[] { "Grid", "Solid" };
     this.m_Planes = new SerializedProperty[6];
     this.m_PlaneVisualizationType = PlaneVizType.Solid;
     this.m_ScaleGrid = 1f;
     base.m_ToolTip = "Allows you to specify multiple collision planes that the particle can collide with.";
 }
Ejemplo n.º 3
0
 public CollisionModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "CollisionModule", displayName)
 {
     this.m_PlaneVizTypeNames      = new string[] { "Grid", "Solid" };
     this.m_Planes                 = new SerializedProperty[6];
     this.m_PlaneVisualizationType = PlaneVizType.Solid;
     this.m_ScaleGrid              = 1f;
     base.m_ToolTip                = "Allows you to specify multiple collision planes that the particle can collide with.";
 }
Ejemplo n.º 4
0
        protected override void Init()
        {
            // Already initialized?
            if (m_Type != null)
            {
                return;
            }
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }

            m_Type = GetProperty("type");

            m_Planes = GetProperty("m_Planes");

            m_Dampen = new SerializedMinMaxCurve(this, s_Texts.dampen, "m_Dampen");
            m_Dampen.m_AllowCurves = false;

            m_Bounce = new SerializedMinMaxCurve(this, s_Texts.bounce, "m_Bounce");
            m_Bounce.m_AllowCurves = false;

            m_LifetimeLossOnCollision = new SerializedMinMaxCurve(this, s_Texts.lifetimeLoss, "m_EnergyLossOnCollision");
            m_LifetimeLossOnCollision.m_AllowCurves = false;

            m_MinKillSpeed = GetProperty("minKillSpeed");
            m_MaxKillSpeed = GetProperty("maxKillSpeed");
            m_RadiusScale  = GetProperty("radiusScale");

            m_PlaneVisualizationType = (PlaneVizType)EditorPrefs.GetInt("PlaneColisionVizType", (int)PlaneVizType.Solid);
            m_ScaleGrid       = EditorPrefs.GetFloat("ScalePlaneColision", 1f);
            s_VisualizeBounds = EditorPrefs.GetBool("VisualizeBounds", false);

            m_CollidesWith        = GetProperty("collidesWith");
            m_CollidesWithDynamic = GetProperty("collidesWithDynamic");
            m_MaxCollisionShapes  = GetProperty("maxCollisionShapes");

            m_Quality = GetProperty("quality");

            m_VoxelSize = GetProperty("voxelSize");

            m_CollisionMessages = GetProperty("collisionMessages");
            m_CollisionMode     = GetProperty("collisionMode");

            m_ColliderForce = GetProperty("colliderForce");
            m_MultiplyColliderForceByCollisionAngle = GetProperty("multiplyColliderForceByCollisionAngle");
            m_MultiplyColliderForceByParticleSpeed  = GetProperty("multiplyColliderForceByParticleSpeed");
            m_MultiplyColliderForceByParticleSize   = GetProperty("multiplyColliderForceByParticleSize");

            m_PlanesList = new ReorderableList(m_Planes.m_SerializedObject, m_Planes, true, false, true, true);
            m_PlanesList.headerHeight        = 0;
            m_PlanesList.drawElementCallback = DrawPlaneElementCallback;
            m_PlanesList.elementHeight       = kReorderableListElementHeight;
            m_PlanesList.onAddCallback       = OnAddPlaneElementCallback;

            SyncVisualization();
        }
Ejemplo n.º 5
0
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }
            string[]       options = new string[] { "Planes", "World" };
            CollisionTypes types   = (CollisionTypes)ModuleUI.GUIPopup(string.Empty, this.m_Type, options);

            if (types == CollisionTypes.Plane)
            {
                this.DoListOfPlanesGUI();
                EditorGUI.BeginChangeCheck();
                this.m_PlaneVisualizationType = (PlaneVizType)ModuleUI.GUIPopup(s_Texts.visualization, (int)this.m_PlaneVisualizationType, this.m_PlaneVizTypeNames);
                if (EditorGUI.EndChangeCheck())
                {
                    EditorPrefs.SetInt("PlaneColisionVizType", (int)this.m_PlaneVisualizationType);
                    if (this.m_PlaneVisualizationType == PlaneVizType.Solid)
                    {
                        this.SyncVisualization();
                    }
                    else
                    {
                        ParticleEffectUtils.ClearPlanes();
                    }
                }
                EditorGUI.BeginChangeCheck();
                this.m_ScaleGrid = ModuleUI.GUIFloat(s_Texts.scalePlane, this.m_ScaleGrid, "f2");
                if (EditorGUI.EndChangeCheck())
                {
                    this.m_ScaleGrid = Mathf.Max(0f, this.m_ScaleGrid);
                    EditorPrefs.SetFloat("ScalePlaneColision", this.m_ScaleGrid);
                    this.SyncVisualization();
                }
            }
            ModuleUI.GUIFloat(s_Texts.dampen, this.m_Dampen);
            ModuleUI.GUIFloat(s_Texts.bounce, this.m_Bounce);
            ModuleUI.GUIFloat(s_Texts.lifetimeLoss, this.m_LifetimeLossOnCollision);
            ModuleUI.GUIFloat(s_Texts.minKillSpeed, this.m_MinKillSpeed);
            if (types != CollisionTypes.World)
            {
                ModuleUI.GUIFloat(s_Texts.particleRadius, this.m_ParticleRadius);
            }
            if (types == CollisionTypes.World)
            {
                ModuleUI.GUILayerMask(s_Texts.collidesWith, this.m_CollidesWith);
                ModuleUI.GUIPopup(s_Texts.quality, this.m_Quality, s_Texts.qualitySettings);
                if (this.m_Quality.intValue > 0)
                {
                    ModuleUI.GUIFloat(s_Texts.voxelSize, this.m_VoxelSize);
                }
            }
            ModuleUI.GUIToggle(s_Texts.collisionMessages, this.m_CollisionMessages);
        }
Ejemplo n.º 6
0
 protected override void Init()
 {
     if (this.m_Type == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_Type = base.GetProperty("type");
         List <SerializedProperty> list = new List <SerializedProperty>();
         for (int i = 0; i < this.m_Planes.Length; i++)
         {
             this.m_Planes[i] = base.GetProperty("plane" + i);
             if ((i == 0) || (this.m_Planes[i].objectReferenceValue != null))
             {
                 list.Add(this.m_Planes[i]);
             }
         }
         this.m_ShownPlanes             = list.ToArray();
         this.m_Dampen                  = new SerializedMinMaxCurve(this, s_Texts.dampen, "m_Dampen");
         this.m_Dampen.m_AllowCurves    = false;
         this.m_Bounce                  = new SerializedMinMaxCurve(this, s_Texts.bounce, "m_Bounce");
         this.m_Bounce.m_AllowCurves    = false;
         this.m_LifetimeLossOnCollision = new SerializedMinMaxCurve(this, s_Texts.lifetimeLoss, "m_EnergyLossOnCollision");
         this.m_LifetimeLossOnCollision.m_AllowCurves = false;
         this.m_MinKillSpeed           = base.GetProperty("minKillSpeed");
         this.m_MaxKillSpeed           = base.GetProperty("maxKillSpeed");
         this.m_RadiusScale            = base.GetProperty("radiusScale");
         this.m_PlaneVisualizationType = (PlaneVizType)EditorPrefs.GetInt("PlaneColisionVizType", 1);
         this.m_ScaleGrid           = EditorPrefs.GetFloat("ScalePlaneColision", 1f);
         s_VisualizeBounds          = EditorPrefs.GetBool("VisualizeBounds", false);
         this.m_CollidesWith        = base.GetProperty("collidesWith");
         this.m_CollidesWithDynamic = base.GetProperty("collidesWithDynamic");
         this.m_InteriorCollisions  = base.GetProperty("interiorCollisions");
         this.m_MaxCollisionShapes  = base.GetProperty("maxCollisionShapes");
         this.m_Quality             = base.GetProperty("quality");
         this.m_VoxelSize           = base.GetProperty("voxelSize");
         this.m_CollisionMessages   = base.GetProperty("collisionMessages");
         this.m_CollisionMode       = base.GetProperty("collisionMode");
         this.SyncVisualization();
     }
 }
Ejemplo n.º 7
0
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     string[] options = new string[] { "Planes", "World" };
     CollisionTypes types = (CollisionTypes) ModuleUI.GUIPopup(string.Empty, this.m_Type, options);
     if (types == CollisionTypes.Plane)
     {
         this.DoListOfPlanesGUI();
         EditorGUI.BeginChangeCheck();
         this.m_PlaneVisualizationType = (PlaneVizType) ModuleUI.GUIPopup(s_Texts.visualization, (int) this.m_PlaneVisualizationType, this.m_PlaneVizTypeNames);
         if (EditorGUI.EndChangeCheck())
         {
             EditorPrefs.SetInt("PlaneColisionVizType", (int) this.m_PlaneVisualizationType);
             if (this.m_PlaneVisualizationType == PlaneVizType.Solid)
             {
                 this.SyncVisualization();
             }
             else
             {
                 ParticleEffectUtils.ClearPlanes();
             }
         }
         EditorGUI.BeginChangeCheck();
         this.m_ScaleGrid = ModuleUI.GUIFloat(s_Texts.scalePlane, this.m_ScaleGrid, "f2");
         if (EditorGUI.EndChangeCheck())
         {
             this.m_ScaleGrid = Mathf.Max(0f, this.m_ScaleGrid);
             EditorPrefs.SetFloat("ScalePlaneColision", this.m_ScaleGrid);
             this.SyncVisualization();
         }
     }
     ModuleUI.GUIFloat(s_Texts.dampen, this.m_Dampen);
     ModuleUI.GUIFloat(s_Texts.bounce, this.m_Bounce);
     ModuleUI.GUIFloat(s_Texts.lifetimeLoss, this.m_LifetimeLossOnCollision);
     ModuleUI.GUIFloat(s_Texts.minKillSpeed, this.m_MinKillSpeed);
     if (types != CollisionTypes.World)
     {
         ModuleUI.GUIFloat(s_Texts.particleRadius, this.m_ParticleRadius);
     }
     if (types == CollisionTypes.World)
     {
         ModuleUI.GUILayerMask(s_Texts.collidesWith, this.m_CollidesWith);
         ModuleUI.GUIPopup(s_Texts.quality, this.m_Quality, s_Texts.qualitySettings);
         if (this.m_Quality.intValue > 0)
         {
             ModuleUI.GUIFloat(s_Texts.voxelSize, this.m_VoxelSize);
         }
     }
     ModuleUI.GUIToggle(s_Texts.collisionMessages, this.m_CollisionMessages);
 }
Ejemplo n.º 8
0
 protected override void Init()
 {
     if (this.m_Type == null)
     {
         this.m_Type = base.GetProperty("type");
         List<SerializedProperty> list = new List<SerializedProperty>();
         for (int i = 0; i < this.m_Planes.Length; i++)
         {
             this.m_Planes[i] = base.GetProperty("plane" + i);
             if ((i == 0) || (this.m_Planes[i].objectReferenceValue != null))
             {
                 list.Add(this.m_Planes[i]);
             }
         }
         this.m_ShownPlanes = list.ToArray();
         this.m_Dampen = base.GetProperty("dampen");
         this.m_Bounce = base.GetProperty("bounce");
         this.m_LifetimeLossOnCollision = base.GetProperty("energyLossOnCollision");
         this.m_MinKillSpeed = base.GetProperty("minKillSpeed");
         this.m_ParticleRadius = base.GetProperty("particleRadius");
         this.m_PlaneVisualizationType = (PlaneVizType) EditorPrefs.GetInt("PlaneColisionVizType", 1);
         this.m_ScaleGrid = EditorPrefs.GetFloat("ScalePlaneColision", 1f);
         this.m_CollidesWith = base.GetProperty("collidesWith");
         this.m_Quality = base.GetProperty("quality");
         this.m_VoxelSize = base.GetProperty("voxelSize");
         this.m_CollisionMessages = base.GetProperty("collisionMessages");
         this.SyncVisualization();
     }
 }
Ejemplo n.º 9
0
        override public void OnInspectorGUI(InitialModuleUI initial)
        {
            EditorGUI.BeginChangeCheck();
            CollisionTypes type = (CollisionTypes)GUIPopup(s_Texts.collisionType, m_Type, s_Texts.collisionTypes);

            if (EditorGUI.EndChangeCheck())
            {
                SyncVisualization();
            }

            if (type == CollisionTypes.Plane)
            {
                DoListOfPlanesGUI();

                EditorGUI.BeginChangeCheck();
                m_PlaneVisualizationType = (PlaneVizType)GUIPopup(s_Texts.visualization, (int)m_PlaneVisualizationType, s_Texts.planeVizTypes);
                if (EditorGUI.EndChangeCheck())
                {
                    EditorPrefs.SetInt("PlaneColisionVizType", (int)m_PlaneVisualizationType);
                }

                EditorGUI.BeginChangeCheck();
                m_ScaleGrid = GUIFloat(s_Texts.scalePlane, m_ScaleGrid, "f2");
                if (EditorGUI.EndChangeCheck())
                {
                    m_ScaleGrid = Mathf.Max(0f, m_ScaleGrid);
                    EditorPrefs.SetFloat("ScalePlaneColision", m_ScaleGrid);
                }

                GUIButtonGroup(s_SceneViewEditModes, s_Texts.toolContents, m_ParticleSystemUI.GetBounds, m_ParticleSystemUI.m_ParticleEffectUI.m_Owner.customEditor);
            }
            else
            {
                GUIPopup(s_Texts.collisionMode, m_CollisionMode, s_Texts.collisionModes);
            }

            GUIMinMaxCurve(s_Texts.dampen, m_Dampen);
            GUIMinMaxCurve(s_Texts.bounce, m_Bounce);
            GUIMinMaxCurve(s_Texts.lifetimeLoss, m_LifetimeLossOnCollision);
            GUIFloat(s_Texts.minKillSpeed, m_MinKillSpeed);
            GUIFloat(s_Texts.maxKillSpeed, m_MaxKillSpeed);
            GUIFloat(s_Texts.radiusScale, m_RadiusScale);

            if (type == CollisionTypes.World)
            {
                GUIPopup(s_Texts.quality, m_Quality, s_Texts.qualitySettings);
                EditorGUI.indentLevel++;
                GUILayerMask(s_Texts.collidesWith, m_CollidesWith);
                GUIInt(s_Texts.maxCollisionShapes, m_MaxCollisionShapes);

                if (m_Quality.intValue == 0)
                {
                    GUIToggle(s_Texts.collidesWithDynamic, m_CollidesWithDynamic);
                }
                else
                {
                    GUIFloat(s_Texts.voxelSize, m_VoxelSize);
                }

                EditorGUI.indentLevel--;

                GUIFloat(s_Texts.colliderForce, m_ColliderForce);
                EditorGUI.indentLevel++;
                GUIToggle(s_Texts.multiplyColliderForceByCollisionAngle, m_MultiplyColliderForceByCollisionAngle);
                GUIToggle(s_Texts.multiplyColliderForceByParticleSpeed, m_MultiplyColliderForceByParticleSpeed);
                GUIToggle(s_Texts.multiplyColliderForceByParticleSize, m_MultiplyColliderForceByParticleSize);
                EditorGUI.indentLevel--;
            }

            GUIToggle(s_Texts.collisionMessages, m_CollisionMessages);

            EditorGUI.BeginChangeCheck();
            s_VisualizeBounds = GUIToggle(s_Texts.visualizeBounds, s_VisualizeBounds);
            if (EditorGUI.EndChangeCheck())
            {
                EditorPrefs.SetBool("VisualizeBounds", s_VisualizeBounds);
            }
        }
Ejemplo n.º 10
0
        protected override void Init()
        {
            // Already initialized?
            if (m_Type != null)
            {
                return;
            }
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }

            m_Type = GetProperty("type");

            List <SerializedProperty> shownPlanes = new List <SerializedProperty>();

            for (int i = 0; i < m_Planes.Length; ++i)
            {
                m_Planes[i] = GetProperty("plane" + i); // Keep name in sync with transfer func in CollisionModule.h
                System.Diagnostics.Debug.Assert(m_Planes[i] != null);

                // Always show the first plane
                if (i == 0 || m_Planes[i].objectReferenceValue != null)
                {
                    shownPlanes.Add(m_Planes[i]);
                }
            }

            m_ShownPlanes = shownPlanes.ToArray();

            m_Dampen = new SerializedMinMaxCurve(this, s_Texts.dampen, "m_Dampen");
            m_Dampen.m_AllowCurves = false;

            m_Bounce = new SerializedMinMaxCurve(this, s_Texts.bounce, "m_Bounce");
            m_Bounce.m_AllowCurves = false;

            m_LifetimeLossOnCollision = new SerializedMinMaxCurve(this, s_Texts.lifetimeLoss, "m_EnergyLossOnCollision");
            m_LifetimeLossOnCollision.m_AllowCurves = false;

            m_MinKillSpeed = GetProperty("minKillSpeed");
            m_MaxKillSpeed = GetProperty("maxKillSpeed");
            m_RadiusScale  = GetProperty("radiusScale");

            m_PlaneVisualizationType = (PlaneVizType)EditorPrefs.GetInt("PlaneColisionVizType", (int)PlaneVizType.Solid);
            m_ScaleGrid       = EditorPrefs.GetFloat("ScalePlaneColision", 1f);
            s_VisualizeBounds = EditorPrefs.GetBool("VisualizeBounds", false);

            m_CollidesWith        = GetProperty("collidesWith");
            m_CollidesWithDynamic = GetProperty("collidesWithDynamic");
            m_MaxCollisionShapes  = GetProperty("maxCollisionShapes");

            m_Quality = GetProperty("quality");

            m_VoxelSize = GetProperty("voxelSize");

            m_CollisionMessages = GetProperty("collisionMessages");
            m_CollisionMode     = GetProperty("collisionMode");

            m_ColliderForce = GetProperty("colliderForce");
            m_MultiplyColliderForceByCollisionAngle = GetProperty("multiplyColliderForceByCollisionAngle");
            m_MultiplyColliderForceByParticleSpeed  = GetProperty("multiplyColliderForceByParticleSpeed");
            m_MultiplyColliderForceByParticleSize   = GetProperty("multiplyColliderForceByParticleSize");

            SyncVisualization();
        }
Ejemplo n.º 11
0
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }
            string[]       options = new string[] { "Planes", "World" };
            CollisionTypes types   = (CollisionTypes)ModuleUI.GUIPopup(string.Empty, this.m_Type, options);
            CollisionModes modes   = CollisionModes.Mode3D;

            if (types == CollisionTypes.Plane)
            {
                this.DoListOfPlanesGUI();
                EditorGUI.BeginChangeCheck();
                this.m_PlaneVisualizationType = (PlaneVizType)ModuleUI.GUIPopup(s_Texts.visualization, (int)this.m_PlaneVisualizationType, this.m_PlaneVizTypeNames);
                if (EditorGUI.EndChangeCheck())
                {
                    EditorPrefs.SetInt("PlaneColisionVizType", (int)this.m_PlaneVisualizationType);
                    if (this.m_PlaneVisualizationType == PlaneVizType.Solid)
                    {
                        this.SyncVisualization();
                    }
                    else
                    {
                        ParticleEffectUtils.ClearPlanes();
                    }
                }
                EditorGUI.BeginChangeCheck();
                this.m_ScaleGrid = ModuleUI.GUIFloat(s_Texts.scalePlane, this.m_ScaleGrid, "f2");
                if (EditorGUI.EndChangeCheck())
                {
                    this.m_ScaleGrid = Mathf.Max(0f, this.m_ScaleGrid);
                    EditorPrefs.SetFloat("ScalePlaneColision", this.m_ScaleGrid);
                    this.SyncVisualization();
                }
            }
            else
            {
                string[] textArray2 = new string[] { "3D", "2D" };
                modes = (CollisionModes)ModuleUI.GUIPopup(s_Texts.collisionMode, this.m_CollisionMode, textArray2);
            }
            EditorGUI.BeginChangeCheck();
            this.m_VisualizeBounds = ModuleUI.GUIToggle(s_Texts.visualizeBounds, this.m_VisualizeBounds);
            if (EditorGUI.EndChangeCheck())
            {
                EditorPrefs.SetBool("VisualizeBounds", this.m_VisualizeBounds);
            }
            s_LastInteractedEditor = this;
            ModuleUI.GUIMinMaxCurve(s_Texts.dampen, this.m_Dampen);
            ModuleUI.GUIMinMaxCurve(s_Texts.bounce, this.m_Bounce);
            ModuleUI.GUIMinMaxCurve(s_Texts.lifetimeLoss, this.m_LifetimeLossOnCollision);
            ModuleUI.GUIFloat(s_Texts.minKillSpeed, this.m_MinKillSpeed);
            if ((types != CollisionTypes.World) || (modes == CollisionModes.Mode2D))
            {
                ModuleUI.GUIFloat(s_Texts.radiusScale, this.m_RadiusScale);
            }
            if (types == CollisionTypes.World)
            {
                ModuleUI.GUILayerMask(s_Texts.collidesWith, this.m_CollidesWith);
                ModuleUI.GUIToggle(s_Texts.collidesWithDynamic, this.m_CollidesWithDynamic);
                if (modes == CollisionModes.Mode3D)
                {
                    ModuleUI.GUIToggle(s_Texts.interiorCollisions, this.m_InteriorCollisions);
                }
                ModuleUI.GUIInt(s_Texts.maxCollisionShapes, this.m_MaxCollisionShapes);
                ModuleUI.GUIPopup(s_Texts.quality, this.m_Quality, s_Texts.qualitySettings);
                if (this.m_Quality.intValue > 0)
                {
                    ModuleUI.GUIFloat(s_Texts.voxelSize, this.m_VoxelSize);
                }
            }
            ModuleUI.GUIToggle(s_Texts.collisionMessages, this.m_CollisionMessages);
        }
Ejemplo n.º 12
0
        override public void OnInspectorGUI(InitialModuleUI initial)
        {
            EditorGUI.BeginChangeCheck();
            CollisionTypes type = (CollisionTypes)GUIPopup(s_Texts.collisionType, m_Type, s_Texts.collisionTypes);

            if (EditorGUI.EndChangeCheck())
            {
                ToolManager.RefreshAvailableTools();
            }

            if (type == CollisionTypes.Plane)
            {
                DoListOfPlanesGUI();
            }
            else
            {
                GUIPopup(s_Texts.collisionMode, m_CollisionMode, s_Texts.collisionModes);
            }

            GUIMinMaxCurve(s_Texts.dampen, m_Dampen);
            GUIMinMaxCurve(s_Texts.bounce, m_Bounce);
            GUIMinMaxCurve(s_Texts.lifetimeLoss, m_LifetimeLossOnCollision);
            GUIFloat(s_Texts.minKillSpeed, m_MinKillSpeed);
            GUIFloat(s_Texts.maxKillSpeed, m_MaxKillSpeed);
            GUIFloat(s_Texts.radiusScale, m_RadiusScale);

            if (type == CollisionTypes.World)
            {
                GUIPopup(s_Texts.quality, m_Quality, s_Texts.qualitySettings);
                EditorGUI.indentLevel++;
                GUILayerMask(s_Texts.collidesWith, m_CollidesWith);
                GUIInt(s_Texts.maxCollisionShapes, m_MaxCollisionShapes);

                if (m_Quality.intValue == 0)
                {
                    GUIToggle(s_Texts.collidesWithDynamic, m_CollidesWithDynamic);
                }
                else
                {
                    GUIFloat(s_Texts.voxelSize, m_VoxelSize);
                }

                EditorGUI.indentLevel--;

                GUIFloat(s_Texts.colliderForce, m_ColliderForce);
                EditorGUI.indentLevel++;
                GUIToggle(s_Texts.multiplyColliderForceByCollisionAngle, m_MultiplyColliderForceByCollisionAngle);
                GUIToggle(s_Texts.multiplyColliderForceByParticleSpeed, m_MultiplyColliderForceByParticleSpeed);
                GUIToggle(s_Texts.multiplyColliderForceByParticleSize, m_MultiplyColliderForceByParticleSize);
                EditorGUI.indentLevel--;
            }

            GUIToggle(s_Texts.collisionMessages, m_CollisionMessages);

            if (EditorGUIUtility.comparisonViewMode == EditorGUIUtility.ComparisonViewMode.None)
            {
                EditorGUILayout.BeginVertical("GroupBox");

                if (type == CollisionTypes.Plane)
                {
                    var editorTools = new List <EditorTool>(2);
                    EditorToolManager.GetComponentTools(x => x.GetEditor <EditorTool>() is CollisionModuleTransformTool, editorTools, true);

                    GUILayout.BeginHorizontal();
                    EditorGUILayout.PrefixLabel(s_Texts.sceneTools, ParticleSystemStyles.Get().label, ParticleSystemStyles.Get().label);
                    EditorGUILayout.EditorToolbar(editorTools);
                    GUILayout.EndHorizontal();

                    EditorGUILayout.Space();

                    EditorGUI.BeginChangeCheck();
                    m_PlaneVisualizationType = (PlaneVizType)GUIPopup(s_Texts.visualization, (int)m_PlaneVisualizationType, s_Texts.planeVizTypes);
                    if (EditorGUI.EndChangeCheck())
                    {
                        EditorPrefs.SetInt("PlaneColisionVizType", (int)m_PlaneVisualizationType);
                    }

                    EditorGUI.BeginChangeCheck();
                    m_ScaleGrid = GUIFloat(s_Texts.scalePlane, m_ScaleGrid, "f2");
                    if (EditorGUI.EndChangeCheck())
                    {
                        m_ScaleGrid = Mathf.Max(0f, m_ScaleGrid);
                        EditorPrefs.SetFloat("ScalePlaneColision", m_ScaleGrid);
                    }
                }
                else
                {
                    GUILayout.Label(s_Texts.sceneTools, ParticleSystemStyles.Get().label);
                }

                EditorGUI.BeginChangeCheck();
                s_VisualizeBounds = GUIToggle(s_Texts.visualizeBounds, s_VisualizeBounds);
                if (EditorGUI.EndChangeCheck())
                {
                    EditorPrefs.SetBool("VisualizeBounds", s_VisualizeBounds);
                }

                EditorGUILayout.EndVertical();
            }
        }