protected override string GetFieldFullName(IFieldSymbol field) { using (allowTypePrefix.Disable()) { if (GetNativeTypeAttribute(field.ContainingType, NativeTarget.C, out _)) { return(field.Name); } string result = base.GetFieldFullName(field); if (!field.IsStatic) { result = $"f_{result}_{GetBaseTypeCount(field.ContainingType)}"; } else { result = $"f_{GetTypeFullName(field.ContainingType)}_{result}"; } return(result); } }
[RPC] public void DoGrab(int id) { target = id.Transform(); var grasp = GetComponentInChildren <Grasp>(); target.SetParent(grasp ? grasp.transform : transform); Enabler.Disable(target); target.localPosition = grasp ? Vector3.zero : Vector3.forward; proxy.Own(id); Notify(N.OnGrab, target); target = null; }