unity kazoo model code example
Example 1: unity createassetmenu
using UnityEngine;
using System.Collections;
[CreateAssetMenu(fileName = "Data", menuName = "Inventory/List", order = 1)]
public class MyScriptableObjectClass : ScriptableObject {
public string objectName = "New MyScriptableObject";
public bool colorIsRandom = false;
public Color thisColor = Color.white;
public Vector3[] spawnPoints;
}
Example 2: unity pingpong
void Update()
{
transform.position = new Vector3(Mathf.PingPong(Time.time, 3), transform.position.y, transform.position.z);
}