find out Animator parameter or current state

For parameter: if(anim.GetBool("reloaded") == false) { //do stuff } For Current State: if (Anim.GetCurrentAnimatorStateInfo(0).IsName("Highlighted")) { Debug.Log ("highlighted detected"); displayImage.canvasRenderer.SetAlpha(1f); } else { Debug.Log ("highlighted removed"); displayImage.canvasRenderer.SetAlpha(0f); }

Pagination Setup in PHP and HTML

Step 1 First, create a few important variable in php. --------- Primary variables ------------ $totallist how many listing in total $totallist = count($ListsToDisplay); $limit How many listing per page ---------…

Events

Event is a special kind of delegate: Step 1: declare an delegate: public delegate void ClickAction(); Step 2: Setup the event public static event ClickAction OnClicked; Step 3: Create the…

Delegate

Step 1 Declare delegate: delegate void MyDelegate(int num); Step 2 Instantiate: MyDelegate myDelegate; Step 3 Create a function to be delegated: void PrintNum(int num){ Debug.Log("Print Num " + num); }…

Unity3d control object movement

there are two way to control object movement: By directly manipulating the transform of a object using UnityEngine; using System.Collections; public class movementControl : MonoBehaviour { public float moveSpeed =…

Time delay trigger for Unity3d

When player enters a collision area for a few seconds, a warning popup will appear. We create a timer called elapsedTime, using OnTriggerStay to start timer and OntriggerExit to reset…

Display GUI on trigger

Using Unity New GUI system, Will first need to create a GUI element using Prefab and save under Resources Folder. Then upon collision trigger, instantiate the GUI prefab and display…