Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

doing void when gameobject setactive unity

void OnEnable() //This void works only when the script is enabled, but when the GameObject enables, the script does to so you can use for gameObject activating
    {
        Debug.Log("PrintOnEnable: script was enabled"); //Your code here
    }

void OnDisable() //Same for the Disable function
    {
        Debug.Log("PrintOnDisable: script was disabled"); //Your code here
    }
Comment

PREVIOUS NEXT
Code Example
Csharp :: get width of image unity 
Csharp :: unity play sound effect 
Csharp :: clamp vector3 unity 
Csharp :: linear search c# 
Csharp :: c# find substring in string 
Csharp :: c# add multiple items to list 
Csharp :: what is the meaning of ?? in c# 
Csharp :: unity random point in sphere 
Csharp :: c# input 
Csharp :: CS0101 Unity Error Code 
Csharp :: c# last char in string 
Csharp :: c# return list in descending order 
Csharp :: c# turn negative number into positive 
Csharp :: c# get application root path directory 
Csharp :: C# program that joins List of strings 
Csharp :: c# remove first line from textbox 
Csharp :: 1 line if c# 
Csharp :: c# empty list 
Csharp :: how to set picturebox width with form width in c# 
Csharp :: how to know character is a digit or not in c# 
Csharp :: font dialog c# code 
Csharp :: linq query to check if record exists 
Csharp :: C# redirecttoaction with area 
Csharp :: c# windows forms open directory in explorer 
Csharp :: c# select a row from datagridview by value 
Csharp :: check if an object is active unity 
Csharp :: c# constructor call another constructor 
Csharp :: c# numbers only 
Csharp :: create new .net core project visual studio 
Csharp :: c# xml get root attributes 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =