FindRemoteAnimator
How do I use Find Remote Animator
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
35 | FindRemoteAnimator(); | 1 |
42 | public void FindRemoteAnimator() | 2 |
File name: DemoMecanimGUI.cs
Copy
33 public void Update()
34 {
35 FindRemoteAnimator();
36
37 m_SlideIn = Mathf.Lerp( m_SlideIn, m_IsOpen ? 1f : 0f, Time.deltaTime * 9f );
38 m_FoundPlayerSlideIn = Mathf.Lerp( m_FoundPlayerSlideIn, m_AnimatorView == null ? 0f : 1f, Time.deltaTime * 5f );
39 }
File name: DemoMecanimGUI.cs
Copy
42 public void FindRemoteAnimator()
43 {
44 if( m_RemoteAnimator != null )
45 {
46 return;
47 }
48
49 // the prefab has to be tagged as Player
50 GameObject[] gos = GameObject.FindGameObjectsWithTag( "Player" );
51 for( int i = 0; i < gos.Length; ++i )
52 {
53 PhotonView view = gos[ i ].GetComponent
54 if( view != null && view.isMine == false )
55 {
56 m_RemoteAnimator = gos[ i ].GetComponent
57 }
58 }
59 }
FindRemoteAnimator 97 lượt xem
Gõ tìm kiếm nhanh...