Example #1
0
    public override void OnInspectorGUI()
    {
        PlanetGenerator generator = (PlanetGenerator)target;

        if (DrawDefaultInspector())
        {
            if (generator.autoUpdate)
            {
                generator.GenerateSphere();
            }
        }

        if (GUILayout.Button("Generate"))
        {
            generator.GenerateSphere();
        }
    }