Quantcast
Channel: Answers for "How to expose script properties in C# ?"
Viewing all articles
Browse latest Browse all 6

Answer by Meltdown

$
0
0

Simply make your variables public like so...

using UnityEngine;
using System.Collections;

public class NewScript : MonoBehaviour
{
    public GameObject myGameObject;
}

On your script in the inspector then you can drag the relevant gameObject to populate the variable.


Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images