Horje
unity add component Code Example
unity add component
//Use the AddComponent<T>() Method to add a component to your gameobject
GameObject gameObject;

gameObject.AddComponent<BoxCollider>(); //Component has to be an actual Unity component
how to add a componet to a gameobject throgh code unity
//This uses C# and unity
//to add a ridgidbody
gameobject.addComponet<ridgidbody>();
//to add a meshCollider
gameobject.addComponet<MeshCollider>();
//check out my profile
unity add component

IEnumerator listStars()
{
    var starDataBank = StarDataBank.Instance;
    var dynamicSize = PlayerPrefs.GetInt("dynamicSize");
    var simulationInstance = FindObjectOfType<Simulation>();
    var starsPerFrame = 10;
    for (int i = 0; i < starDataBank.NumOfStars; i++)
    {
        // do your stuff
        for (int j = 0; j < starsPerFrame; j++)
            placeStars(simulationInstance, primaryID, properName, HIPID, HDID, HRID, GLID, BFID, rightAscension, declination, Mag, CI, scale));
        yield return null;
    }
    DestroyImmediate(starDataBank.gameObject);
}





Csharp

Related
c# store strings in file Code Example c# store strings in file Code Example
move in the direction that player is facing unity Code Example move in the direction that player is facing unity Code Example
unity 2d jump Code Example unity 2d jump Code Example
check if number is even or odd c# Code Example check if number is even or odd c# Code Example
convert int to double c# Code Example convert int to double c# Code Example

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