Skip to content
View SpecialEventClass.cs
/*
* When developing the UI system we came across a bunch of things we were not happy
* with with regards to how certain events and calls could be sent in a loosely coupled
* way. We had this requirement because with a UI you tend to implement widgets that receive
* certain events, but you don't really want to have lots of glue code to manage them
* and keep track of them. The eventing interfaces we developed helped with this. One of
* the interesting things, is that they are not justfor the UI system! You can use this as
* a type-safe, fast, and simple alternative to SendMessage (never use SendMessage!).
* So how does it all work?
View TouchInputModule.cs
using System.Text;
namespace UnityEngine.EventSystems
{
[AddComponentMenu("Event/Touch Input Module")]
public class TouchInputModule : PointerInputModule
{
protected TouchInputModule()
{}
using System;
using System.Collections.Generic;
using System.Text;
namespace UnityEngine.UI
{
/// <summary>
/// Labels are graphics that display text.
/// </summary>
using System;
using UnityEngine.Events;
using UnityEngine.EventSystems;
namespace UnityEngine.UI
{
[AddComponentMenu ("UI/Scroll Rect", 33)]
[SelectionBase]
[ExecuteInEditMode]
using System.Collections.Generic;
namespace UnityEngine.UI
{
[AddComponentMenu ("UI/Effects/Shadow", 14)]
public class Shadow : BaseVertexEffect
{
[SerializeField]
private Color m_EffectColor = new Color (0f, 0f, 0f, 0.5f);
View CustomEvents.cs
using System;
using System.Collections.Generic;
using UnityEngine.Events;
// interface you implement in your MB to receive events
public interface ICustomHandler : IEventSystemHandler
{
void OnCustomCode(CustomEventData eventData);
}
View ContentSizeFitter.cs
using UnityEngine.EventSystems;
namespace UnityEngine.UI
{
[AddComponentMenu("Layout/Content Size Fitter", 141)]
[ExecuteInEditMode]
[RequireComponent (typeof (RectTransform))]
public class ContentSizeFitter : UIBehaviour, ILayoutSelfController
{
View Graphic.cs
using System;
using System.Collections.Generic;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using UnityEngine.UI.CoroutineTween;
namespace UnityEngine.UI
{
/// <summary>
/// Base class for all UI components that should be derived from when creating new Graphic types.
using System;
using System.Collections.Generic;
namespace UnityEngine.UI
{
/// <summary>
/// Image is a textured element in the UI hierarchy.
/// </summary>
[AddComponentMenu("UI/Image", 10)]
View PhysicalResolution.cs
using UnityEngine.EventSystems;
namespace UnityEngine.UI
{
[RequireComponent (typeof (Canvas))]
[ExecuteInEditMode]
[AddComponentMenu("Layout/Physical Resolution", 102)]
public class PhysicalResolution : UIBehaviour
{
Something went wrong with that request. Please try again.