Пример #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        AsteroidSpawner myScript = (AsteroidSpawner)target;

        if (GUILayout.Button("Regenerate"))
        {
            myScript.destroyAsteroids();
            myScript.spawnAsteroids();
        }
    }