Exemplo n.º 1
0
        private void OnEnable()
        {
            multiHotspot = (MultiHotspot)target;

            //Hotspot Prefabs
            baseHotspotPrefab      = serializedObject.FindProperty("baseHotspotPrefab");
            imageHotspotPrefab     = serializedObject.FindProperty("imageHotspotPrefab");
            invisibleHotspotPrefab = serializedObject.FindProperty("invisibleHotspotPrefab");

            //GeneralSettings
            onClickAction = serializedObject.FindProperty("_clickAction");
        }
        private void FindPresentingHotspotControllerOrMultiHotspot()
        {
            var controllerTransform = transform.parent;

            if (controllerTransform.GetComponent <HotspotBatch>())
            {
                controllerTransform = controllerTransform.parent;
            }
            else if (controllerTransform.GetComponent <MultiHotspot>())
            {
                presentingMultiHotspot = controllerTransform.GetComponent <MultiHotspot>();
            }
            controller = controllerTransform.GetComponent <HotspotController>();
        }