Beispiel #1
0
        protected override void OnTCInspectorGUI()
        {
            PropField("ShapeData", new GUIContent("Shape", "The shape of the emitter"));

            GUILayout.Space(20.0f);

            PropField("m_tag", new GUIContent("Tag", "The tag to link with particle systems"));

            var tagProp = GetProperty("m_tag");

            if (!tagProp.hasMultipleDifferentValues && tagProp.objectReferenceValue == null)
            {
                EditorGUILayout.HelpBox("Shape emitter must have a tag", MessageType.Warning);
            }


            EditorGUILayout.BeginHorizontal();
            PropField("EmissionRate", new GUIContent("Emission Rate", "Amount of particles to emit per second or unit"));
            PropField("EmissionType", new GUIContent("", "Determines whether particles are emitter per second or per unit"),
                      GUILayout.Width(80.0f));
            EditorGUILayout.EndHorizontal();

            PropField("Emit", new GUIContent("Do Emit", "Toggles emitting on this shape emitter"));

            if (m_target.ShapeData.emitMesh == m_prevMesh)
            {
                return;
            }

            m_drawer.UpdateMesh(m_target.ShapeData.emitMesh);
            m_prevMesh = m_target.ShapeData.emitMesh;
        }