Esempio n. 1
0
            /// <summary>
            /// Call from your Start method
            /// </summary>
            protected void Start()
            {
                if (null != iface)
                {
                    return;
                }
                AdvertisePath();
                GameObject go       = this.gameObject;
                PathHolder holder   = null;
                string     usedPath = path;

                while (null != go && 0 == usedPath.Length)
                {
                    holder = go.GetComponent <PathHolder>();
                    if (null != holder)
                    {
                        usedPath = holder.path;
                        //print("[OSVR] " + name + ": Found path " + usedPath + " in ancestor " + go.name);
                    }
                    go = GetParent.Get(go);
                }

                if (0 == usedPath.Length)
                {
                    Debug.LogError("[OSVR] Missing path for " + name + " - no path found in this object's InterfaceGameObject or any ancestor!");
                    return;
                }

                iface      = ScriptableObject.CreateInstance <InterfaceCallbacks>();
                iface.path = usedPath;
                iface.Start();
            }
            /// <summary>
            /// Call from your Start method
            /// </summary>
            protected override void Start()
            {
                base.Start();
                if (null != iface)
                {
                    return;
                }

                iface      = ScriptableObject.CreateInstance <InterfaceCallbacks>();
                iface.path = usedPath;
                iface.Start();
            }
            /// <summary>
            /// Call from your Start method
            /// </summary>
            protected override void Start()
            {
                base.Start ();
                if (null != iface)
                {
                    return;
                }

                iface = ScriptableObject.CreateInstance<InterfaceCallbacks>();
                iface.path = usedPath;
                iface.Start();
            }
            /// <summary>
            /// Call from your Start method
            /// </summary>
            protected void Start()
            {
                if (null != iface)
                {
                    return;
                }
                AdvertisePath();
                GameObject go = this.gameObject;
                PathHolder holder = null;
                string usedPath = path;
                while (null != go && 0 == usedPath.Length)
                {
                    holder = go.GetComponent<PathHolder>();
                    if (null != holder)
                    {
                        usedPath = holder.path;
                        //print("[OSVR] " + name + ": Found path " + usedPath + " in ancestor " + go.name);
                    }
                    go = GetParent.Get(go);
                }

                if (0 == usedPath.Length)
                {
                    Debug.LogError("[OSVR] Missing path for " + name + " - no path found in this object's InterfaceGameObject or any ancestor!");
                    return;
                }

                iface = ScriptableObject.CreateInstance<InterfaceCallbacks>();
                iface.path = usedPath;
                iface.Start();
            }