public void OnAnyInputFieldChanged() { if (!isInitialized) { return; } // Skip during initialization. myData.belief = if_belief.text; myData.debate = if_debate.text; PanelIBs.SaveIBData(myData); UpdateComponentPositionsWithDelay(); }
// ================================================================ // Initialize // ================================================================ public void Initialize(PanelIBs _myPanel, IBData _myData) { this.myData = _myData; this.myPanel = _myPanel; // Parent me properly GameUtils.ParentAndReset(gameObject, myPanel.rt_entriesParent); myRT.SetSiblingIndex(myRT.parent.childCount - 2); // Update texts if_belief.text = myData.belief; if_debate.text = myData.debate; t_myIndex.text = (myData.myIndex + 1).ToString(); UpdateComponentPositionsWithDelay(); isInitialized = true; }