Quantcast
Viewing all articles
Browse latest Browse all 99

Assets/Standard Assets (Mobile)/Scripts/SidescrollControl.js(33,18): BCE0020: An instance of type 'UnityEngine.Transform' is required to access non static member 'Find'.

****I have a problem saving my script this is the part of the error might help me?** **error:** "Assets/Standard Assets (Mobile)/Scripts/SidescrollControl.js(33,18): BCE0020: An instance of type 'UnityEngine.Transform' is required to access non static member 'Find'." code: @script RequireComponent( CharacterController ) // This script must be attached to a GameObject that has a CharacterController var moveTouchPad : Joystick; var jumpTouchPad : Joystick; var forwardSpeed : float = 4; var backwardSpeed : float = 4; var jumpSpeed : float = 16; var inAirMultiplier : float = 0.25; // Limiter for ground speed while jumping private var thisTransform : Transform; private var character : CharacterController; private var velocity : Vector3; // Used for continuing momentum while in air private var canJump = true; private var player:GameObject; function Start() { **player=Transform.Find("player").GameObject;** // Cache component lookup at startup instead of doing this every frame thisTransform = GetComponent( Transform ); character = GetComponent( CharacterController );

Viewing all articles
Browse latest Browse all 99

Trending Articles