protected override void ReadFromImpl(object obj) { base.ReadFromImpl(obj); Camera uo = (Camera)obj; nearClipPlane = uo.nearClipPlane; farClipPlane = uo.farClipPlane; fieldOfView = uo.fieldOfView; renderingPath = uo.renderingPath; allowHDR = uo.allowHDR; allowMSAA = uo.allowMSAA; allowDynamicResolution = uo.allowDynamicResolution; forceIntoRenderTexture = uo.forceIntoRenderTexture; orthographicSize = uo.orthographicSize; orthographic = uo.orthographic; opaqueSortMode = uo.opaqueSortMode; transparencySortMode = uo.transparencySortMode; transparencySortAxis = uo.transparencySortAxis; depth = uo.depth; aspect = uo.aspect; cullingMask = uo.cullingMask; eventMask = uo.eventMask; layerCullSpherical = uo.layerCullSpherical; cameraType = uo.cameraType; layerCullDistances = uo.layerCullDistances; useOcclusionCulling = uo.useOcclusionCulling; cullingMatrix = uo.cullingMatrix; backgroundColor = uo.backgroundColor; clearFlags = uo.clearFlags; depthTextureMode = uo.depthTextureMode; clearStencilAfterLightingPass = uo.clearStencilAfterLightingPass; usePhysicalProperties = uo.usePhysicalProperties; sensorSize = uo.sensorSize; lensShift = uo.lensShift; focalLength = uo.focalLength; rect = uo.rect; pixelRect = uo.pixelRect; targetTexture = ToID(uo.targetTexture); targetDisplay = uo.targetDisplay; worldToCameraMatrix = uo.worldToCameraMatrix; projectionMatrix = uo.projectionMatrix; nonJitteredProjectionMatrix = uo.nonJitteredProjectionMatrix; useJitteredProjectionMatrixForTransparentRendering = uo.useJitteredProjectionMatrixForTransparentRendering; scene = uo.scene; stereoSeparation = uo.stereoSeparation; stereoConvergence = uo.stereoConvergence; stereoTargetEye = uo.stereoTargetEye; }
private void Awake() { if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); } else if (Instance != this) { Destroy(gameObject); return; } User = UserService.Instance.User; // Instantiate a new Game Character with preset Stats and setup GameCharacter = new GameCharacter(User.GetActiveCharacter().Name, User.GetActiveCharacter().HeroClass); GameCharacter.Stats.Setup(); }