add
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
//----------------------------------------------
|
||||
// NGUI: Next-Gen UI kit
|
||||
// Copyright <20> 2011-2015 Tasharen Entertainment
|
||||
//----------------------------------------------
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Very basic script that will activate or deactivate an object (and all of its children) when clicked.
|
||||
/// </summary>
|
||||
|
||||
[AddComponentMenu("NGUI/Interaction/Button Activate")]
|
||||
public class UIButtonActivate : MonoBehaviour
|
||||
{
|
||||
public GameObject target;
|
||||
public bool state = true;
|
||||
|
||||
void OnClick () { if (target != null) NGUITools.SetActive(target, state); }
|
||||
}
|
||||
Reference in New Issue
Block a user