예제 #1
0
        // Note(Brandon): The start function will not be called on a disabled gameObject.
        public void Start()
        {
            if (!menuPlacement)
            {
                throw new UnassignedReferenceException("menuPlacement");
            }

            ColorPickerManager.AssignMenuPlacement(menuPlacement);

            ColorPickerManager.InitListeners();
        }
예제 #2
0
        /*
         *
         * /!\ Don't forget to make the texture readable. Select your texture in the Inspector. Choose [Texture Import Setting] > Texture Type > Advanced > Read/Write enabled > True, then Apply.
         *
         */

        public void Start()
        {
            if (!colorImageObject)
            {
                throw new UnassignedReferenceException("colorImageObject");
            }

            ColorPickerManager.AssignComponentReferences(lineRenderers, triggers, handCamera, colorImageObject, selectedColorCursor, previewColorCursor, selectedColorDisplay, previewColorDisplay);

            TryGrabPlayerDrawTargets();
        }
예제 #3
0
 public void Awake()
 {
     ColorPickerManager.Init();
 }
예제 #4
0
 // Stop selecting color, because OnPointerExit will not fire if the GameObject is disabled.
 public void OnDisable()
 {
     ColorPickerManager.StopSelectingColor();
 }
예제 #5
0
 public void OnPointerUp(PointerEventData eventData)
 {
     ColorPickerManager.StopDragging();
 }
예제 #6
0
 public void OnPointerDown(PointerEventData eventData)
 {
     ColorPickerManager.StartDragging();
 }
예제 #7
0
 public void OnPointerExit(PointerEventData eventData)
 {
     ColorPickerManager.StopPreviewing();
 }
예제 #8
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     ColorPickerManager.StartPreviewing();
 }
예제 #9
0
 // Change color marker to match image selection location
 public void OnPointerClick(PointerEventData eventData)
 {
     ColorPickerManager.SetSelectedColorCursorPosition(eventData);
 }
예제 #10
0
 public void Update()
 {
     ColorPickerManager.UpdateColors();
 }