void DoEnable() { // Find SmartARController if (smartARController_ != null) { return; } var controllers = (SmartARController[])FindObjectsOfType(typeof(SmartARController)); if (controllers != null && controllers.Length > 0) { smartARController_ = controllers[0]; } // Find SmartARController if (smartAREffector_ != null) { return; } var smartAREffectors = (SmartAREffector[])FindObjectsOfType(typeof(SmartAREffector)); if (smartAREffectors != null && smartAREffectors.Length > 0) { smartAREffector_ = smartAREffectors[0]; } if (targetEffector_ != null) { return; } var targetEffectors = FindObjectsOfType <TargetEffector>(); if (targetEffectors != null && targetEffectors.Length > 0) { targetEffector_ = targetEffectors[0]; } }
void Start() { targetEffector_ = FindObjectsOfType <TargetEffector>()[0]; }