Horje
unity class Code Example
unity class
// Classes are where you store the main program e.g. fields, methods, etc.
// Here are some types of classes: Partial, Private, Public, Sealed, Static.

public class MyClass
{
	// Fields
	public int myInt = 4;
    public int myNextInt = 6;
    public int result;
    public bool myBool = false;

	// Methods
	public void MyMethod()
    {
    	// Method program
        if (!myBool)
        {
        	result = myInt + myNextInt
            Debug.Log(result)
        }
    }
}

/*  Any class member that is set to private can only be accessed by other members of 
that same class. Public classes have the opposite affect. */




Csharp

Related
multiplication of long numbers Code Example multiplication of long numbers Code Example
C# check if is first run Code Example C# check if is first run Code Example
rigidbody.addtorque Code Example rigidbody.addtorque Code Example
get char lowercase in c# Code Example get char lowercase in c# Code Example
method c# Code Example method c# Code Example

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