unity create primitive
C#
using UnityEngine;public class Example : MonoBehaviour
{
// Create a plane, sphere and cube in the Scene. void Start()
{
GameObject plane = GameObject.CreatePrimitive(PrimitiveType.Plane);
GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
cube.transform.position = new Vector3(0, 0.5f, 0);
GameObject sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
sphere.transform.position = new Vector3(0, 1.5f, 0);
GameObject capsule = GameObject.CreatePrimitive(PrimitiveType.Capsule);
capsule.transform.position = new Vector3(2, 1, 0);
GameObject cylinder = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
cylinder.transform.position = new Vector3(-2, 1, 0);
}
}
Also in C#:
- Title
- c# param exception
- Category
- C#
- Title
- C# public 2d array
- Category
- C#
- Title
- Instantiate c#
- Category
- C#
- Title
- exit game unity
- Category
- C#
- Title
- unity key detection
- Category
- C#
- Title
- set width of rect transform unity
- Category
- C#
- Title
- create dropdown in datatable c# dynamically
- Category
- C#
- Title
- c# print
- Category
- C#
- Title
- unity rotation
- Category
- C#
- Title
- c# summary tag
- Category
- C#
- Title
- c# combobox datasource enum
- Category
- C#
- Title
- c# resize bitmap
- Category
- C#
- Title
- ignore fakeiteasy
- Category
- C#
- Title
- sum of digits in c#
- Category
- C#
- Title
- unity if gameobject exists
- Category
- C#
- Title
- reference to gameobject in different scene unity
- Category
- C#
- Title
- unity fall damage c#
- Category
- C#
- Title
- c# making a folder
- Category
- C#
- Title
- c# format string to date yyyymmdd
- Category
- C#
- Title
- c# cheat sheet
- Category
- C#
- Title
- how to spawn coins randomly around the screen unity 2d
- Category
- C#
- Title
- create expression func c# for use in where clause
- Category
- C#
- Title
- C# get all files in directory
- Category
- C#
- Title
- unity jump
- Category
- C#
- Title
- check if string is email c#
- Category
- C#
- Title
- how consider the first caracter in Split c#
- Category
- C#
- Title
- how to add movement in unity
- Category
- C#
- Title
- orderby make sunday last day c#
- Category
- C#
- Title
- copy a list C#
- Category
- C#
- Title
- F# convert generic.List to list
- Category
- C#
- Title
- check for collision unity c#
- Category
- C#
- Title
- create char array c#
- Category
- C#
- Title
- c# regex replace
- Category
- C#
- Title
- unity quaternion
- Category
- C#
- Title
- run async methods within a sync process
- Category
- C#
- Title
- unity monobehaviour
- Category
- C#
- Title
- mouseposition unity
- Category
- C#
- Title
- c# reverse list
- Category
- C#
- Title
- covert char[] to string C#
- Category
- C#
- Title
- c# add object to array
- Category
- C#
- Title
- asp.net core task iactionresult
- Category
- C#
- Title
- C# for
- Category
- C#
- Title
- C# array index tostring
- Category
- C#
- Title
- write string multiple times c#
- Category
- C#
- Title
- c# get list of all class fields
- Category
- C#
- Title
- how to add array to list in c#
- Category
- C#
- Title
- asp net mvc 5 return view from another controller
- Category
- C#
- Title
- Unity if object doens't exist
- Category
- C#
- Title
- creating a c# class
- Category
- C#
- Title
- C# .net core convert string to enum
- Category
- C#
- Title
- to list c#
- Category
- C#
- Title
- convert string to decimal c#
- Category
- C#
- Title
- how to cast list to observablecollection c#
- Category
- C#
- Title
- how to make an object move in unity
- Category
- C#
- Title
- viewBag as a list
- Category
- C#
- Title
- how to set progress openedge driver name for odbc connection c#
- Category
- C#
- Title
- multidimensional meaning
- Category
- C#
- Title
- asking for user input integer c#
- Category
- C#
- Title
- C# Into To Tring Debug.Log
- Category
- C#
- Title
- find gameobject with tag
- Category
- C#
- Title
- get enum value c#
- Category
- C#
- Title
- unity rotate towards mouse
- Category
- C#
- Title
- c# two dimensional array
- Category
- C#
- Title
- get all child gameObject of gameObject C#
- Category
- C#
- Title
- wpf label text in center
- Category
- C#
- Title
- c# lambda expression
- Category
- C#
- Title
- how to destroy a gameobject after some hits in unity 3d
- Category
- C#
- Title
- set int to null c#
- Category
- C#
- Title
- What is a class in c#
- Category
- C#
- Title
- unity transformer double en float
- Category
- C#
- Title
- how to turn 3 floats into quartenion
- Category
- C#
- Title
- how to clear console through script unity
- Category
- C#
- Title
- c# delegate return value invoke
- Category
- C#
- Title
- c# global enumerator
- Category
- C#
- Title
- how to convert from hexadecimal to binary in c#
- Category
- C#
- Title
- degree between two points latitude longitude c#
- Category
- C#
- Title
- unity rotate around point
- Category
- C#
- Title
- csharp first element of array
- Category
- C#
- Title
- how to make infinite loop in c#
- Category
- C#
- Title
- configure 1 to 1 relation ef
- Category
- C#
- Title
- c# one line set
- Category
- C#
- Title
- unity c# foreach
- Category
- C#
- Title
- response redirect new tab
- Category
- C#
- Title
- get string character by index c#
- Category
- C#
- Title
- how to crouch in unity
- Category
- C#
- Title
- bytes size c#
- Category
- C#
- Title
- winforms c# add data to datagridview with a button
- Category
- C#
- Title
- unity persistent data
- Category
- C#
- Title
- how to use K2 games Games parallax background
- Category
- C#
- Title
- webutility.urlencode space
- Category
- C#
- Title
- asp textarea
- Category
- C#
- Title
- unity 2d Drag object
- Category
- C#
- Title
- remove items from list c# condition
- Category
- C#
- Title
- random bool c#
- Category
- C#
- Title
- c# arraylist contains
- Category
- C#
- Title
- c# check to see if dictionary key exists
- Category
- C#
- Title
- C# sprint key
- Category
- C#
- Title
- c# convert excel column index to letter
- Category
- C#
- Title
- degree to radians c#
- Category
- C#
- Title
- decalre an int list mvc
- Category
- C#