GridObjectOptions

Updated on August 3, 2022

public void Move()

After using the ObjectSelector to select an object, this function then sets up unblocking the cells of that object and also basically resetting it to be placed again.

If you call this from another script, just be sure to set this class’s SelectedObj variable. The SelectedObj will also need to have the GridObject class on it to replace it.

public GridObjectOptions gridObjectOptions;
public Button btn;
public GameObject objectToMove;

void Start() 
{
    btn.onClick.AddListener(() => 
    {
         gridObjectOptions.SelectedObj = objectToMove;
         gridObjectOptions.Move();
    });
}

public void OpenMenu(Vector3 pos, GameObject obj)

Opens the menu assigned in the inspector slot for Menu Canvas. It opens the menu at pos at the obj height plus Menu Hover set in the inspector.

public void CloseMenu()

Sets the active menu’s visibilty to false.

Still need help? Contact support at support@golemitegames.com

Please describe your issue in detail and if possible, provide screenshots to help us understand your problem better and answer your question more effectively.