You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/3rd/ThirteenPixels/Placr/Editor/Modifiers/PlacrModifierBase.cs

34 lines
881 B
C#

3 months ago
// Copyright <20> Sascha Graeff/13Pixels.
namespace ThirteenPixels.Placr
{
using UnityEngine;
using UnityEditor;
public abstract class PlacrModifierBase : ScriptableObject
{
public abstract string title { get; }
public abstract void ApplyTo(GameObject gameObject);
private SerializedObject serializedObject;
internal void DisplayProperties()
{
if (serializedObject == null)
{
serializedObject = new SerializedObject(this);
}
serializedObject.Update();
var property = serializedObject.GetIterator();
property.NextVisible(true);
while (property.NextVisible(false))
{
EditorGUILayout.PropertyField(property);
}
serializedObject.ApplyModifiedProperties();
}
}
}