void OnGUI()
{
GUILayout.Box("Legacy Effect Scale Editor", GUILayout.Width(295));
EditorGUILayout.Space();
Effect = (GameObject)EditorGUILayout.ObjectField("Legacy Effect", Effect, typeof(GameObject), true);
EditorGUILayout.Space();
EditorGUILayout.Space();
EditorGUILayout.Space();
EditorGUILayout.Space();
Scale = float.Parse(EditorGUILayout.TextField("Scale Change Value", Scale.ToString()));
EditorGUILayout.Space();
EditorGUILayout.Space();
EditorGUILayout.Space();
EditorGUILayout.Space();
if (GUILayout.Button("Scale Apply", GUILayout.Height(70)))
{
if (Effect.GetComponent<csLegacyEffectChanger>() != null)
Effect.GetComponent<csLegacyEffectChanger>().LegacyEffectScaleChange(Scale);
else
{
Effect.AddComponent<csLegacyEffectChanger>();
Effect.GetComponent<csLegacyEffectChanger>().LegacyEffectScaleChange(Scale);
}
DestroyImmediate(Effect.GetComponent<csLegacyEffectChanger>());
}
}