void OnDestroy() { if (Instance == this) { Instance = null; } }
void Reset() { if (Instance == this) { Instance = null; } }
public void SetTransactionDetails(EthKeyManager keyManager, TransactionDetails details) { UnityEngine.UI.Text text = GetComponentInChildren <UnityEngine.UI.Text>(); text.text = (details.ContractName != null ? details.ContractName + " - " : "") + details.TransactionReceipt.TransactionHash; TransactionDetails = details; EthKeyManager = keyManager; }
void Start() { EthKeyManager = GetComponentInParent <EthKeyManager>(); LandManager = GetComponentInParent <LandManager>(); Text = GetComponentInChildren <TextMesh>(); Terrain = GetComponentInChildren <Terrain>(); Text.gameObject.SetActive(false); Terrain.gameObject.SetActive(false); }
// Start is called before the first frame update void Start() { EthKeyManager = GetComponent <EthKeyManager>(); LandTileDialoge = DialogeBaseObject.GetComponentInChildren <LandTileDialoge>(); if (LandTileDialoge == null) { Debug.LogError("LandTileDialog not found."); } //NOTE: this works if everything is setup correct. LandTileLogic[] landTileLogics = GetComponentsInChildren <LandTileLogic>(); LandTileLogics = landTileLogics.OrderBy(x => x.IslandNumber).ToList(); if (LandTileLogics.Count != 18) { Debug.LogError("Expected to have 18 LandTileLogics as children!"); } }