コード例 #1
0
 public override void OnInspectorGUI()
 {
     DrawDefaultInspector();
     if (GUI.changed)
     {
         ZippyTerrain2DChild tar = (target as ZippyTerrain2DChild);
         tar.PositionOnTerrain();
         tar.lastPos = tar.transform.localPosition;
     }
 }
コード例 #2
0
        void Update()
        {
            ZippyTerrain2DChild tar = (target as ZippyTerrain2DChild);

            if (target == null)
            {
                return;
            }
            if (tar.lastPos != tar.transform.localPosition)
            {
                tar.PositionOnTerrain();
                tar.lastPos = tar.transform.localPosition;
            }
        }