// Give some random GUID on awake in case we aren't setting this thing up from a proxy. private void Awake() { m_Guid = ProxyWorld.CreateGuid(); VirtualAwake(); ComponentList.OnStart(this); }
private void Start() { foreach (var child in transform.GetChildren()) { if (child.name.Contains("ight")) { m_LightOb = child.gameObject; } } ComponentList.OnStart(this); // get the transform of the main camera if (Camera.main != null) { m_Cam = Camera.main.transform; } else { Debug.LogWarning( "Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls."); // we use self-relative controls in this case, which probably isn't what the user wants, but hey, we warned them! } // get the third person character ( this should never be null due to require component ) m_Character = GetComponent <ThirdPersonCharacter>(); VirtualStart(); }
private void Awake() { ComponentList.OnStart(this); }