Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to access gameobject name

// note how the 'g' is lowercase, when it's lowercase it accesses the GameObject its attached to
gameObject.name
// so if this script was attached an object named "Player", it will access "Player"
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# date formats custom 
Csharp :: unity detect number key 
Csharp :: get datacontext of parent wpf 
Csharp :: unity c# throw exception 
Csharp :: mouselook script unity 
Csharp :: c# round number down 
Csharp :: how to populate listbox using list<t c# 
Csharp :: move towards target unity 
Csharp :: percentage in c# 
Csharp :: c# debug console log 
Csharp :: unity time.deltatime timescale 0 
Csharp :: oncollisionenter unity 
Csharp :: even number checker in c# 
Csharp :: c# separate string by a new line 
Csharp :: unity create button with parameter 
Csharp :: read configuration workerservice 
Csharp :: public static void Load 
Csharp :: c# winforms tooltip 
Csharp :: add items to listbox from text file c# 
Csharp :: c# check if is float 
Csharp :: animations for pause menu 
Csharp :: camera follow player 
Csharp :: c# random string 
Csharp :: c# set int infinity 
Csharp :: c# string newline 
Csharp :: unity how to change the text on a button 
Csharp :: time.timescale 
Csharp :: c# string to byte array 
Csharp :: c# class to byte array 
Csharp :: c# retrieve files in folder 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =