OnClickDestroy









How do I use On Click Destroy
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: ManualPhotonViewAllocator.cs Copy
23     public void InstantiateRpc(int viewID)
24     {
25         GameObject go = GameObject.Instantiate(Prefab, InputToEvent.inputHitPos + new Vector3(0, 5f, 0), Quaternion.identity) as GameObject;
26         go.GetPhotonView().viewID = viewID;
27
28         OnClickDestroy ocd = go.GetComponent();
29         ocd.DestroyByRpc = true;
30     }

Download file with original file name:OnClickDestroy

OnClickDestroy 145 lượt xem

Gõ tìm kiếm nhanh...