Skip to content

Instantly share code, notes, and snippets.

@anchan828
Created October 2, 2013 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anchan828/8ce42635b5ce92c90c23 to your computer and use it in GitHub Desktop.
Save anchan828/8ce42635b5ce92c90c23 to your computer and use it in GitHub Desktop.
using UnityEngine;
public class Question6 : MonoBehaviour {
public Vector3[] positions = new Vector3[]
{
new Vector3(0,0,0),
new Vector3(-5,0,0),
new Vector3(0,5,0),
new Vector3(0,0,5),
new Vector3(5,-5,5),
};
}
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(Question6))]
public class Question6Editor : Editor
{
void OnSceneGUI()
{
Question6 question6 = (Question6)target;
for (int i = 0; i < question6.positions.Length; i++)
{
question6.positions[i] = Handles.DoPositionHandle(question6.positions[i], Quaternion.identity);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment