how to create instance in Unity

#1 Create Class Car.

using UnityEngine;
using System.Collections;
 
public class Car : ScriptableObject {
	public string color;
 
	void Awake(){
		color = "red";
	}
}

#2 Create instance.

using UnityEngine;
using System.Collections;
 
public class main : MonoBehaviour {
	void Start(){
		Car polo = (Car) ScriptableObject.CreateInstance(typeof(Car));
	}
}

Add a Comment