Tanoda
IValueProxy.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
9using UnityEngine;
10
11namespace Leap.Unity {
12
25 public interface IValueProxy {
26
32
38 }
39
46 public abstract class AutoValueProxy : MonoBehaviour, IValueProxy {
47
48 [SerializeField, HideInInspector]
49 private bool _autoPushingEnabled = false;
50 public bool autoPushingEnabled {
51 get {
52 return _autoPushingEnabled;
53 }
54 set {
55 _autoPushingEnabled = value;
56 }
57 }
58
59 public abstract void OnPullValue();
60 public abstract void OnPushValue();
61
62 private void LateUpdate() {
63 if (_autoPushingEnabled) {
65 }
66 }
67 }
68}
A helpful implementation of IValueProxy. The class is a monobehaviour and so can be attached to game ...
Definition: IValueProxy.cs:46
abstract void OnPullValue()
Called when this proxy should pull from the target object into its serialized representation.
abstract void OnPushValue()
Called when this proxy should push its serialized representation out to the target object.
A simple interface that allows an object to act as a 'proxy' interface to another object....
Definition: IValueProxy.cs:25
void OnPullValue()
Called when this proxy should pull from the target object into its serialized representation.
void OnPushValue()
Called when this proxy should push its serialized representation out to the target object.