public override void OnInspectorGUI()
    {
        GPUFluid.GPUFluidManager fm = (GPUFluid.GPUFluidManager)target;

        if (DrawDefaultInspector())
        {
        }
        if (obsticlesRemoved)
        {
            if (GUILayout.Button("Set Obstacles"))
            {
                fm.SetObstacles();
                obsticlesRemoved = false;
            }
        }
        else if (GUILayout.Button("Remove Obstacles"))
        {
            fm.RemoveObstacles();
            obsticlesRemoved = true;
        }
    }
Ejemplo n.º 2
0
 void Start()
 {
     fluidManager = FindObjectOfType <GPUFluid.GPUFluidManager>();
 }