Legacy and Shuriken Particle System find hidden properties name

Hey guys !

So this is my first post on this forum but i’m working with unity for over 2 years now. So, i’m currently creating and editor script for both Legacy particle system and the new Shuriken particle system, basically what i need is to access each serialized properties of both particles system. For the legacy particle system it was the more easy because almost all properties are public, except for the Ellipsoid and Tangent Velocity property. Now i’ve been able to find the Ellipsoid variable name using :

SerializedObject so = new SerializedObject(myLegacyParticleScript);
so.FindProperty("m_Ellipsoid")

But I was not been able to find the name of the TangentVelocity serialized property name. So I was wondering if someone of Unity Team or anybody on this forum knows all serialized properties name of Lagacy Particle System and of the New Shiruken Particle System.

Thanks for your help ! :wink:

Hey !

Finally I found the solution by myself. I’ve written a script which output all the Properties (Variables) name of all components on selected object. Then I can easily access the property using my code above. If anyone needs it in the future this is my code :

using UnityEngine;
using UnityEditor;
using System.Collections;

public class FindAllProperties : Editor 
{
	[MenuItem("Window/Find All Object Properties ")]
	
	static void Init ()
	{
		Component[] allComponent;
		allComponent = Selection.activeGameObject.GetComponents<Component>();
		
		foreach(Component go in allComponent)
		{
			SerializedObject m_Object = new SerializedObject(go);
			Debug.Log ("--------"+ go.GetType() +"-------");
			try
			{
				SerializedProperty obj = m_Object.GetIterator();
				
				foreach(SerializedProperty property in obj)
				{
					Debug.Log(property.name + " : " + property.propertyType);
				}
			}
			catch(System.Exception e)
			{
				
			}
		}
	}
}

P.S. Need to be put in Editor folder.

Thanks.

Thanks for sharing!

Since it seems to be undocumented everywhere, I went ahead and made a nicely formatted list that contains all property names separated by module, with corresponding type

     Shuriken Property Names
    
     Anything marked Generic type can have these params
     Generic:
        scalar : Float
        maxCurve : AnimationCurve
        minCurve : AnimationCurve
        minMaxState : Integer
    
    
     Base properties (no prefix, "m_LocalRotation")
        m_LocalRotation : Quaternion
        m_LocalPosition : Vector3
        m_LocalScale : Vector3
        lengthInSec : Float
        startDelay : Float
        speed : Float
        randomSeed : Integer
        looping : Boolean
        prewarm : Boolean
        playOnAwake : Boolean
        moveWithTransform : Boolean

    Submodules accessed via SubmoduleName.propertyName (ie InitialModule.startLifetime)
    InitialModule
        enabled : Boolean
        startLifetime : Generic
        startSpeed : Generic
        startColor : Generic
        minMaxState : Integer
        startSize : Generic
        startRotation : Generic
        gravityModifier : Float
        inheritVelocity : Float
        maxNumParticles : Integer

    ShapeModule
        enabled : Boolean
        type : Integer
        radius : Float
        angle : Float
        length : Float
        boxX : Float
        boxY : Float
        boxZ : Float
        placementMode : Integer
        m_Mesh : ObjectReference
        randomDirection : Boolean

    EmissionModule
        enabled : Boolean
        m_Type : Integer
        rate : Generic
        cnt0 : Integer
        cnt1 : Integer
        cnt2 : Integer
        cnt3 : Integer
        time0 : Float
        time1 : Float
        time2 : Float
        time3 : Float
        m_BurstCount : Integer

    SizeModule
        enabled : Boolean
        curve : Generic

    RotationModule
        enabled : Boolean
        curve : Generic

    ColorModule
        enabled : Boolean
        gradient : Generic
        maxGradient : Gradient
        minGradient : Gradient
        minColor : Color
        maxColor : Color
        minMaxState : Integer

    UVModule
        enabled : Boolean
        frameOverTime : Generic
        tilesX : Integer
        tilesY : Integer
        animationType : Integer
        rowIndex : Integer
        cycles : Float
        randomRow : Boolean

    VelocityModule
        enabled : Boolean
        x : Generic
        y : Generic
        z : Generic
        inWorldSpace : Boolean

    ForceModule
        enabled : Boolean
        x : Generic
        y : Generic
        z : Generic
        inWorldSpace : Boolean
        randomizePerFrame : Boolean

    ExternalForcesModule
        enabled : Boolean
        multiplier : Float
        ClampVelocityModule : Generic
        enabled : Boolean
        x : Generic
        y : Generic
        z : Generic
        magnitude : Generic
        separateAxis : Boolean
        inWorldSpace : Boolean
        dampen : Float

    SizeBySpeedModule
        enabled : Boolean
        curve : Generic
        range : Vector2

    RotationBySpeedModule
        enabled : Boolean
        curve : Generic
        range : Vector2

    ColorBySpeedModule
        enabled : Boolean
        gradient : Generic
        maxGradient : Gradient
        minGradient : Gradient
        minColor : Color
        maxColor : Color
        minMaxState : Integer
        range : Vector2

    CollisionModule
        enabled : Boolean
        type : Integer
        plane0 : ObjectReference
        plane1 : ObjectReference
        plane2 : ObjectReference
        plane3 : ObjectReference
        plane4 : ObjectReference
        plane5 : ObjectReference
        dampen : Float
        bounce : Float
        energyLossOnCollision : Float
        minKillSpeed : Float
        particleRadius : Float
        collidesWith : LayerMask
        quality : Integer
        voxelSize : Float
        collisionMessages : Boolean

    SubModule
        enabled : Boolean
        subEmitterBirth : ObjectReference
        subEmitterBirth1 : ObjectReference
        subEmitterCollision : ObjectReference
        subEmitterCollision1 : ObjectReference
        subEmitterDeath : ObjectReference
        subEmitterDeath1 : ObjectReference
        m_CastShadows : Boolean
        m_ReceiveShadows : Boolean
        m_Materials : Generic
        size : ArraySize
        data : ObjectReference
        m_UseLightProbes : Boolean
        m_LightProbeAnchor : ObjectReference
        m_RenderMode : Integer
        m_MaxParticleSize : Float
        m_CameraVelocityScale : Float
        m_VelocityScale : Float
        m_LengthScale : Float
        m_SortingFudge : Float
        m_NormalDirection : Float
        m_SortMode : Integer
        m_Mesh : ObjectReference
        m_Mesh1 : ObjectReference
        m_Mesh2 : ObjectReference
        m_Mesh3 : ObjectReference
        m_Avatar : ObjectReference
        m_Controller : ObjectReference
        m_CullingMode : Enum
        m_UpdateMode : Enum
        m_ApplyRootMotion : Boolean
        m_HasTransformHierarchy : Boolean
        m_AllowConstantClipSamplingOptimization : Boolean

Thanks but…
I Want to Chenge The particle system hidden properties value

But Can not Chenge.

using UnityEngine;
using UnityEditor;
using System.Collections;

public class FindAllProperties : Editor
{
    [MenuItem("Assets/Find All Object Properties ")]

    static void Init ()
    {
        Component[] allComponent;
        allComponent = Selection.activeGameObject.GetComponents<Component>();

        bool bool_UVModule=false;
        bool bool_frameOverTime=false;
        foreach(Component go in allComponent)
        {
            SerializedObject m_Object = new SerializedObject(go);
            Debug.Log ("--------"+ go.GetType() +"-------");
            try
            {
                SerializedProperty obj = m_Object.GetIterator();

                foreach(SerializedProperty property in obj)
                {
                    Debug.Log(property.name + " : " + property.propertyType);
                    if(property.name=="UVModule"){
                        Debug.Log("//#######UVModule #############");
                        bool_UVModule=true;
                    }
                    if(bool_UVModule==true){
                        if(property.name=="enabled"){
                            property.boolValue=true;;
                        }
                        if(property.name=="frameOverTime"){
                            bool_frameOverTime=true;
                        }
                        if(property.name=="scalar"){
                            property.floatValue=0.0f;
                            bool_frameOverTime=false;
                        }
                        if(property.name=="tilesX"){
                            property.intValue=2;

                        }
                        if(property.name=="tilesY"){
                            property.intValue=2;
                        }

                        if(property.name=="animationType"){
                            property.intValue=0;//whole sheet
                        }

                        if(property.name=="UVModule"){}
                    }
                    if(property.name=="VelocityModule"){
                        Debug.Log("//#######VelocityModule#############");
                        bool_UVModule=false;
                    }

                }
            }
            catch(System.Exception e)
            {

            }
        }
    }
}

UVModule is “Texture Sheet Animation”

but un chenge this.

2221474--147884--screen2015-07-26 1.19.07.png

I Make Particle YAML Editor
http://whaison.jugem.jp/?eid=744

how to Deserialized this in runtime?