This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void MyFunction(){...} | |
public void MyFunction(float parameter){...} | |
public void MyFunction(int parameter){...} | |
public void MyFunction(string parameter){...} | |
public void MyFunction(bool parameter){...} | |
public void MyFunction(Object parameter){...} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class ButtonEvent : MonoBehaviour { | |
public void ClickButtonEvent(){ | |
transform.position = new Vector3 (0, 5, 0); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class OnClickBtnScript : MonoBehaviour { | |
public Button btn; | |
void Start () { | |
btn.onClick.AddListener (OnClickBtnCallback); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.EventSystems; | |
public class EventTriggerEx : EventTrigger | |
{ | |
public override void OnBeginDrag( PointerEventData data ){Debug.Log( "OnBeginDrag called." );} | |
public override void OnCancel( BaseEventData data ){Debug.Log( "OnCancel called." );} | |
public override void OnDeselect( BaseEventData data ){Debug.Log( "OnDeselect called." );} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.EventSystems; | |
public class EventTriggerDelegateEx : MonoBehaviour | |
{ | |
void Start( ) | |
{ | |
EventTrigger trigger = GetComponent<EventTrigger>( ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EventTriggerType.PointerEnter //IPointerEnterHandler.OnPointerEnter をフックする。 | |
EventTriggerType.PointerExit //IPointerExitHandler.OnPointerExit をフックする。 | |
EventTriggerType.PointerDown //IPointerDownHandler.OnPointerDown をフックする。 | |
EventTriggerType.PointerUp //IPointerUpHandler.OnPointerUp をフックする。 | |
EventTriggerType.PointerClick //IPointerClickHandler.OnPointerClick をフックする。 | |
EventTriggerType.Drag //IDragHandler.OnDrag をフックする。 | |
EventTriggerType.Drop //IDropHandler.OnDrop をフックする。 | |
EventTriggerType.Scroll //IScrollHandler.OnScroll をフックする。 | |
EventTriggerType.UpdateSelected //IUpdateSelectedHandler.OnUpdateSelected をフックする。 | |
EventTriggerType.Select //ISelectHandler.OnSelect をフックする。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class Health : MonoBehaviour { | |
public Slider slider; | |
void Update () { | |
//1秒間に0.5増加する速度でスライダーの値を1まで動かす |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using TMPro; | |
using System.Collections; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
[ExecuteInEditMode] | |
public class ArchedText : MonoBehaviour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using TMPro; | |
using System.Collections; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
[ExecuteInEditMode] | |
public class CurvedText : MonoBehaviour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SafeAreaBounds : MonoBehaviour | |
{ | |
private RectTransform target; | |
#if UNITY_EDITOR | |
public bool emulateIPhoneX = false; |
OlderNewer