示例#1
0
    void OnSceneGUI()
    {
        cloner = target as LinearClone;

        cloner.start = showPositionHPoint(cloner.start);
        cloner.end   = showPositionHPoint(cloner.end);
        cloner.recalculatePositions();
        drawClonePath();

        if (cloner.containerTransform.hasChanged)
        {
            drawClonePath();
            cloner.recalculatePositions();
        }
    }
示例#2
0
    public override void OnInspectorGUI()
    {
        cloner.prefab        = EditorGUILayout.ObjectField("Prefab", cloner.prefab, typeof(GameObject), true) as GameObject;
        cloner.Count         = EditorGUILayout.IntField("Count", cloner.Count);
        cloner.StartPosition = EditorGUILayout.Vector3Field("End Position", cloner.StartPosition);
        cloner.EndPosition   = EditorGUILayout.Vector3Field("End Position", cloner.EndPosition);

        if (GUILayout.Button("Generate"))
        {
            cloner.updateClonesStack();
            cloner.recalculatePositions();
        }
        if (GUILayout.Button("Clear Stack"))
        {
            cloner.Clear();
        }
    }