Game Development Reference
In-Depth Information
008 public class CreateQuad : ScriptableWizard
009 {
010 //Anchor point for created quad
011 public enum AnchorPoint
012 {
013 TopLeft,
014 TopMiddle,
015 TopRight,
016 RightMiddle,
017 BottomRight,
018 BottomMiddle,
019 BottomLeft,
020 LeftMiddle,
021 Center,
022 Custom
023 }
024
025 //Name of Quad Asset
026 public string MeshName = "Quad";
027
028 //Game Object Name
029 public string GameObjectName = "Plane_Object";
030
031 //Name of asset folder
032 public string AssetFolder = "Assets";
033
034 //Width of quad in world units (pixels)
035 public float Width = 1.0f;
036
037 //Height of quad in world units (pixels)
038 public float Height = 1.0f;
039
040 //Position of Anchor
041 public AnchorPoint Anchor = AnchorPoint.Center;
042
043 //Horz Position of Anchor on Plane
044 public float AnchorX = 0.5f;
045
046 //Vert Position of Anchor on Plane
047 public float AnchorY = 0.5f;
048 //------------------------------------------------
049 [MenuItem("GameObject/Create Other/Custom Plane")]
050 static void CreateWizard()
051 {
 
Search WWH ::




Custom Search