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.
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)
{
}
}
}
}
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