예제 #1
0
 protected override bool Init(ACTkDetectorBase instance, string detectorName)
 {
     if (cachedUri == null)
     {
         cachedUri = UrlToUri(requestUrl);
     }
     return(base.Init(instance, detectorName));
 }
예제 #2
0
 private static void DestroyDetectorImmediate(ACTkDetectorBase component)
 {
     if (component.transform.childCount == 0 && component.GetComponentsInChildren <Component>(true).Length <= 2)
     {
         DestroyImmediate(component.gameObject);
     }
     else
     {
         DestroyImmediate(component);
     }
 }
예제 #3
0
        protected virtual bool Init(ACTkDetectorBase instance, string detectorName)
        {
            if (instance != null && instance != this && instance.keepAlive)
            {
                Debug.LogWarning(ACTkConstants.LogPrefix + name +
                                 ": self-destroying, other instance already exists & only one instance allowed!", gameObject);
                Destroy(this);
                return(false);
            }

            DontDestroyOnLoad(transform.parent != null ? transform.root.gameObject : gameObject);

            return(true);
        }