private void OnValidate() { #if UNITY_EDITOR if (string.IsNullOrEmpty(Chave) && gameObject.scene.name != null) { // ID = BuscadorDeID.GetUniqueID(gameObject, ID.ToString()); Chave = GetInstanceID() + "_" + gameObject.scene.name + "_Barreira"; //ID = System.Guid.NewGuid().ToString(); BuscadorDeID.SetUniqueIdProperty(this, Chave, "chave"); } #endif }
private void OnValidate() { BuscadorDeID.Validate(ref ID, this); }