//-------------------------------------------------
 void Awake()
 {
     if (linearMapping == null)
     {
         linearMapping = GetComponent <LinearMapping_project>();
     }
 }
Beispiel #2
0
        protected virtual void Start()
        {
            if (linearMapping == null)
            {
                linearMapping = GetComponent <LinearMapping_project>();
            }

            if (linearMapping == null)
            {
                linearMapping = gameObject.AddComponent <LinearMapping_project>();
            }

            initialMappingOffset = linearMapping.value;

            if (repositionGameObject)
            {
                UpdateLinearMapping(transform);
            }
        }