浏览代码

Base work on VirtualCameraManager

/main
Thomas ICHÉ 5 年前
当前提交
c6d87ae1
共有 5 个文件被更改,包括 183 次插入1 次删除
  1. 3
      Runtime/GameplayIngredients.asmdef
  2. 135
      Resources/Default_VirtualCameraManager.prefab
  3. 7
      Resources/Default_VirtualCameraManager.prefab.meta
  4. 28
      Runtime/Managers/Implementations/VirtualCameraManager.cs
  5. 11
      Runtime/Managers/Implementations/VirtualCameraManager.cs.meta

3
Runtime/GameplayIngredients.asmdef


{
"name": "GameplayIngredients",
"references": [
"NaughtyAttributes"
"NaughtyAttributes",
"Cinemachine"
],
"optionalUnityReferences": [],
"includePlatforms": [],

135
Resources/Default_VirtualCameraManager.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3027554877427853619
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3027554877427853612}
- component: {fileID: 3027554877427853613}
- component: {fileID: 2796896273931921891}
- component: {fileID: 3027554877427853618}
- component: {fileID: 3027554877427853615}
m_Layer: 0
m_Name: default_virtualcameramanager
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3027554877427853612
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3027554877427853619}
m_LocalRotation: {x: -0.2058242, y: 0.53439623, z: -0.13606744, w: -0.80841994}
m_LocalPosition: {x: 7.1058645, y: 4.024516, z: -5.1810875}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!20 &3027554877427853613
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3027554877427853619}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_GateFitMode: 2
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.1
far clip plane: 5000
field of view: 40
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!114 &2796896273931921891
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3027554877427853619}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2a050287a9067304195c4fe5661de7e2, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!81 &3027554877427853618
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3027554877427853619}
m_Enabled: 1
--- !u!114 &3027554877427853615
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3027554877427853619}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 72ece51f2901e7445ab60da3685d6b5f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShowDebugText: 0
m_ShowCameraFrustum: 1
m_IgnoreTimeScale: 0
m_WorldUpOverride: {fileID: 0}
m_UpdateMethod: 2
m_DefaultBlend:
m_Style: 1
m_Time: 2
m_CustomCurve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_CustomBlends: {fileID: 0}
m_CameraCutEvent:
m_PersistentCalls:
m_Calls: []
m_TypeName: Cinemachine.CinemachineBrain+BrainEvent, Cinemachine, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
m_CameraActivatedEvent:
m_PersistentCalls:
m_Calls: []
m_TypeName: Cinemachine.CinemachineBrain+VcamActivatedEvent, Cinemachine, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null

7
Resources/Default_VirtualCameraManager.prefab.meta


fileFormatVersion: 2
guid: cbee0477b75dc50409223c54e13e1bbe
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

28
Runtime/Managers/Implementations/VirtualCameraManager.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Cinemachine;
namespace GameplayIngredients
{
[RequireComponent(typeof(Camera))]
[RequireComponent(typeof(CinemachineBrain))]
[ManagerDefaultPrefab("VirtualCameraManager")]
public class VirtualCameraManager : Manager
{
Camera m_Camera;
CinemachineBrain m_Brain;
private void Awake()
{
m_Camera = GetComponent<Camera>();
m_Brain = GetComponent<CinemachineBrain>();
}
public void BlendToCamera(CinemachineVirtualCamera camera, float delay)
{
}
}
}

11
Runtime/Managers/Implementations/VirtualCameraManager.cs.meta


fileFormatVersion: 2
guid: 2a050287a9067304195c4fe5661de7e2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存