first time, Update the code in iTween.cs file

void CallBack(string callbackType){
if (tweenArguments.Contains(callbackType) && !tweenArguments.Contains("ischild")) {
//establish target:
GameObject target;
if (tweenArguments.Contains(callbackType+"target")) {
target=(GameObject)tweenArguments[callbackType+"target"];
}else{
target=gameObject; 
}

/// Start of update
if (tweenArguments[callbackType] is Action<object>)
{
((Action<object>)tweenArguments[callbackType]).Invoke((object)tweenArguments[callbackType + "params"]);
}
else
/// End of update


//throw an error if a string wasn't passed for callback:
if (tweenArguments[callbackType].GetType() == typeof(System.String)) {
target.SendMessage((string)tweenArguments[callbackType],(object)tweenArguments[callbackType+"params"],SendMessageOptions.DontRequireReceiver);
}else{
Debug.LogError("iTween Error: Callback method references must be passed as a String!");
Destroy (this);
}
}
}

Now, You could use the Action<T> delegate in iTween.


iTween.ValueTo(gameObject,
iTween.Hash(
"from", 1f,
"to", 0f,
"time", 1f,
"onupdate", (System.Action<object>)(x => { missedInfo.color = new Color(1f, 0f, 0f, (float)x); }),
"oncomplete", (System.Action<object>)(x => missedInfo.gameObject.SetActive(true))
)
);

 

 

2017/10/06 07:32 2017/10/06 07:32
I am curious why they made UI System complex.
anyway, If you get any event from Event system(on UI), you can choice 2 options.

1. Using EventTrigger 
=> In my thinking, It's so terrible idea.It needs so many manual tasks. So I skip it. 

2. Using EventSystem
=> It's simple. However, I am finding another solution. Because it's not automation by runtime script.

a. add using...
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using UnityEngine.EventSystems;


b. inherit from interfaces
public class BehaviorButton : MonoBehaviour, IPointerEnterHandler {

}


c. add Method
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using UnityEngine.EventSystems;

public class BehaviorButton : MonoBehaviour, IPointerEnterHandler {
    public void OnPointerEnter(PointerEventData eventData) 
    {
 
    }
}


You can find it on unity's manual. (https://docs.unity3d.com/Manual/SupportedEvents.html)

IPointerEnterHandler - OnPointerEnter - Called when a pointer enters the object
IPointerExitHandler - OnPointerExit - Called when a pointer exits the object

IPointerDownHandler - OnPointerDown - Called when a pointer is pressed on the object
IPointerUpHandler - OnPointerUp - Called when a pointer is released (called on the original the pressed object)

IPointerClickHandler - OnPointerClick - Called when a pointer is pressed and released on the same object

IInitializePotentialDragHandler - OnInitializePotentialDrag - Called when a drag target is found, can be used to initialise values
IBeginDragHandler - OnBeginDrag - Called on the drag object when dragging is about to begin
IDragHandler - OnDrag - Called on the drag object when a drag is happening
IEndDragHandler - OnEndDrag - Called on the drag object when a drag finishes
IDropHandler - OnDrop - Called on the object where a drag finishes

IScrollHandler - OnScroll - Called when a mouse wheel scrolls

IUpdateSelectedHandler - OnUpdateSelected - Called on the selected object each tick

ISelectHandler - OnSelect - Called when the object becomes the selected object
IDeselectHandler - OnDeselect - Called on the selected object becomes deselected

IMoveHandler - OnMove - Called when a move event occurs (left, right, up, down, ect)

ISubmitHandler - OnSubmit - Called when the submit button is pressed
ICancelHandler - OnCancel - Called when the cancel button is pressed

* 영어 울렁증 가지고 계신분들께 죄송 -_-;; 
* 영어 연습겸 블로그에 영어로 작성중입니다.

2017/09/25 08:06 2017/09/25 08:06
* Prepare: Windows

1. Download Java JDK : http://www.oracle.com/technetwork/java ··· 151.html2. Install JDK
3. Open control panel
4. Open system path & Variable (Environment variable)
   a. search & run control panel.
   b. click System.
   c. click Advanced System setting.
5. create new system variable.
   a. JAVA_HOME: {Java JDK Path} (for example: D:\Program Files (x86)\Java\jdk1.8.0_25)
   b. CLASS_PATH: %JAVA_HOME%\lib
   c. PATH (just add new value): %JAVA_HOME%\bin
6. Download & Install Android Studio : https://developer.android.com/studio/index.html
7. Open Unity3d and Open Preferences
8. Click External Tool tab
9. Setup JDK / Android and NDK

Done

   

2017/09/13 17:28 2017/09/13 17:28