void Start() { parent = transform.parent; meshRenderer = transform.parent.GetComponent <Renderer>(); text = transform.Find("Text").GetComponent <Text>(); state = transform.parent.GetComponent <BBState>(); }
/** * Called when the user clicks on the 'Submit' button in the panel that * appears with the 'text' tool selected. */ public void OnClickLabelPanelSubmit() { if (selectedObj == null) { Debug.LogWarning("Selected obj was null when submit button was pressed. This should not happen."); return; } BBState state = selectedObj.GetComponent <BBState>(); state.label = labelField.text.ToLower(); }
private static extern void bbGetState(out BBState state);