public void LoadResourceInsteadOfAwake() { if (m_bLoadResourceInsteadOfAwake) return; m_bLoadResourceInsteadOfAwake = true; m_myTransform = transform; FillFullNameData(m_myTransform); m_goFingerTailUIDrawRange = FindTransform("FingerTailUIDrawRange").gameObject; m_goFingerTailUIDrawPanel = FindTransform("FingerTailUIDrawPanel").gameObject; DontDestroyOnLoad(m_goFingerTailUIDrawPanel); ShowFingerTailUIDrawPanel(false); m_goFingerTailUIDrawPanel.transform.parent = null; m_goFingerTailUIDrawPanel.transform.localPosition = Vector3.zero; m_goFingerTailUIDrawPanel.transform.localScale = new Vector3(1, 1, 1); m_MFUIFingerTail = m_goFingerTailUIDrawRange.AddComponent<MFUIFingerTail>(); m_MFUIFingerTail.UICamera = GameObject.Find("Camera").GetComponentsInChildren<Camera>(true)[0]; m_MFUIFingerTail.GoTail = m_goFingerTailUIDrawPanel; m_MFUIFingerTail.TailWidth = 20; m_MFUIFingerTail.LoadResourceInsteadOfAwake(); }
public void LoadResourceInsteadOfAwake() { if (m_bLoadResourceInsteadOfAwake) { return; } m_bLoadResourceInsteadOfAwake = true; m_myTransform = transform; FillFullNameData(m_myTransform); m_goFingerTailUIDrawRange = FindTransform("FingerTailUIDrawRange").gameObject; m_goFingerTailUIDrawPanel = FindTransform("FingerTailUIDrawPanel").gameObject; DontDestroyOnLoad(m_goFingerTailUIDrawPanel); ShowFingerTailUIDrawPanel(false); m_goFingerTailUIDrawPanel.transform.parent = null; m_goFingerTailUIDrawPanel.transform.localPosition = Vector3.zero; m_goFingerTailUIDrawPanel.transform.localScale = new Vector3(1, 1, 1); m_MFUIFingerTail = m_goFingerTailUIDrawRange.AddComponent <MFUIFingerTail>(); m_MFUIFingerTail.UICamera = GameObject.Find("Camera").GetComponentsInChildren <Camera>(true)[0]; m_MFUIFingerTail.GoTail = m_goFingerTailUIDrawPanel; m_MFUIFingerTail.TailWidth = 20; m_MFUIFingerTail.LoadResourceInsteadOfAwake(); }