public virtual void EditorInspector(ChangePropertyPrefabAction parent) { if (Properties == null) { Properties = new List <string>(); var so = new SerializedObject(parent.targetObj); var prop = so.GetIterator(); var canNext = true; while (prop != null && canNext) { if (prop.propertyType == PropertyType) { Properties.Add(prop.name); } canNext = prop.Next(true); } for (int i = 0; i < Properties.Count; i++) { if (Properties[i] == Name) { Selected = i; } } } Selected = EditorGUILayout.Popup("Property name", Selected, Properties.ToArray()); Name = Properties[Selected]; }
public override void EditorInspector(ChangePropertyPrefabAction parent) { base.EditorInspector(parent); StringValue = EditorGUILayout.TextField("Assign value", StringValue); }
public override void EditorInspector(ChangePropertyPrefabAction parent) { base.EditorInspector(parent); ObjectGUID = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(EditorGUILayout.ObjectField("Assign reference", AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(ObjectGUID), typeof(UnityEngine.Object)), typeof(UnityEngine.Object), false).GetInstanceID())); }