Horje
unity create cube in script Code Example
unity create cube in script
void Start()
    {
    	/*GameObject != gameObject*/
        GameObject cubeObject = GameObject.CreatePrimitive(PrimitiveType.Cube);
        
        /*if you need add position, scale and color to the cube*/
        cubeObject.transform.localPosition = new Vector3(0, 1, 0);
        cubeObject.transform.localScale = new Vector3(1, 1, 1);
        cubeObject.GetComponent<MeshRenderer>().material.color = Color.red  ;
    }




Csharp

Related
c# round number down Code Example c# round number down Code Example
c# how to add newline on text box Code Example c# how to add newline on text box Code Example
increase variable C# Code Example increase variable C# Code Example
c# and Code Example c# and Code Example
how to lock and hide the cursor unity Code Example how to lock and hide the cursor unity Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12