private void Awake() { // if the singleton hasn't been initialized yet if (instance != null && instance != this) { Destroy(this.gameObject); return;//Avoid doing anything else } instance = this; DontDestroyOnLoad(this.gameObject); }
public PropertyDescriptorCollection GetProperties() { // Create a new collection object PropertyDescriptorCollection PropertyDescriptorCollection pds = new PropertyDescriptorCollection(null); // Iterate the list of employees for (int i = 0; i < WrappedShapeIds.Count; i++) { ShapeFrameIdPair pair = ShapeDataManager.RetrieveShapeForFrame(WrappedShapeIds[i], FrameId); ShapePropertyDescriptor pd = new ShapePropertyDescriptor(pair.Shape, $"[{i}]"); pds.Add(pd); } return(pds); }
public ShapeListWrapper(List <uint> shapeIds, ShapeDataManager shapeDataManager, int frameId) { WrappedShapeIds = shapeIds; ShapeDataManager = shapeDataManager; FrameId = frameId; }
public RigidBodyPropertyWrapper(RigidBody bodyToWrap, ShapeDataManager shapeDataManager, int frameId) { BodyToWrap = bodyToWrap; Matrix4x4Wrapper = new Matrix4x4PropertyWrapper(BodyToWrap.WorldMatrix); ShapeListWrapper = new ShapeListWrapper(bodyToWrap.CollisionShapeIds, shapeDataManager, frameId); }