Init
6
.vsconfig
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"components": [
|
||||
"Microsoft.VisualStudio.Workload.ManagedGame"
|
||||
]
|
||||
}
|
||||
1057
Assets/InputSystem_Actions.inputactions
Normal file
14
Assets/InputSystem_Actions.inputactions.meta
Normal file
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 052faaac586de48259a63d0c4782560b
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
|
||||
generateWrapperCode: 0
|
||||
wrapperCodePath:
|
||||
wrapperClassName:
|
||||
wrapperCodeNamespace:
|
||||
8
Assets/Plugins.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69035e73ea4e25a4592cf1d08e76cc5a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Plugins/GenericController.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6451148b055de754fb30fc15d65fe211
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
341
Assets/Plugins/GenericController/Controller.prefab
Normal file
@@ -0,0 +1,341 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2656137905910655519
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3640034311448942995}
|
||||
- component: {fileID: 1502361923454310464}
|
||||
- component: {fileID: 8226876023088850677}
|
||||
m_Layer: 0
|
||||
m_Name: PRF_ControllerViewTarget
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3640034311448942995
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2656137905910655519}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -20, y: 27, z: -20}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 135340969371884068}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1502361923454310464
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2656137905910655519}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: eab1a07f8f5c6754a8f2a9789fb6b020, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
alwaysActive: 0
|
||||
active: 0
|
||||
--- !u!135 &8226876023088850677
|
||||
SphereCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2656137905910655519}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 1
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Radius: 0.25
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &4602595839876627761
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7888456699290281049}
|
||||
- component: {fileID: 1769739476192758786}
|
||||
- component: {fileID: 2795261250788500754}
|
||||
- component: {fileID: 6689677178373688372}
|
||||
- component: {fileID: 6315610840044275566}
|
||||
m_Layer: 10
|
||||
m_Name: Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7888456699290281049
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4602595839876627761}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.35355338, y: 0.35355338, z: -0.1464466, w: 0.8535535}
|
||||
m_LocalPosition: {x: -45, y: 62.35534, z: -45}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 135340969371884068}
|
||||
m_LocalEulerAnglesHint: {x: 45, y: 45, z: 0}
|
||||
--- !u!20 &1769739476192758786
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4602595839876627761}
|
||||
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_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 0
|
||||
m_AllowMSAA: 0
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!114 &2795261250788500754
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4602595839876627761}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fafd8d68ae7258c4485adb2fffef3373, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
camera: {fileID: 0}
|
||||
option: {fileID: 11400000, guid: 0443d35219f9d1646a57d550cc10e2b9, type: 2}
|
||||
nextPosition: {x: 0, y: 0, z: 0}
|
||||
saveTargetPositions:
|
||||
datas: []
|
||||
maxValue: 0
|
||||
duration_MoveToCamera: 5
|
||||
speed_MoveToCamera: 1
|
||||
process: 0
|
||||
yUpPos: 0
|
||||
runSpeed: 0
|
||||
up: 119
|
||||
down: 115
|
||||
left: 97
|
||||
right: 100
|
||||
run: 304
|
||||
targetVisualization: 306
|
||||
viewMode: 2
|
||||
targetColliderRadius: 0
|
||||
--- !u!136 &6689677178373688372
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4602595839876627761}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 1
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.5
|
||||
m_Height: 1
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &6315610840044275566
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4602595839876627761}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_AllowHDROutput: 1
|
||||
m_UseScreenCoordOverride: 0
|
||||
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
m_TaaSettings:
|
||||
m_Quality: 3
|
||||
m_FrameInfluence: 0.1
|
||||
m_JitterScale: 1
|
||||
m_MipBias: 0
|
||||
m_VarianceClampScale: 0.9
|
||||
m_ContrastAdaptiveSharpening: 0
|
||||
--- !u!1 &8457166540169997683
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3282114688579573793}
|
||||
- component: {fileID: 2097398073062650089}
|
||||
m_Layer: 0
|
||||
m_Name: MaxRange
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3282114688579573793
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8457166540169997683}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 135340969371884068}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &2097398073062650089
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8457166540169997683}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 1
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 100, y: 40, z: 100}
|
||||
m_Center: {x: 0, y: 15, z: 0}
|
||||
--- !u!1 &9065749286782967344
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 135340969371884068}
|
||||
m_Layer: 0
|
||||
m_Name: Controller
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &135340969371884068
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9065749286782967344}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 3640034311448942995}
|
||||
- {fileID: 3282114688579573793}
|
||||
- {fileID: 7888456699290281049}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
7
Assets/Plugins/GenericController/Controller.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8aa14877be9b924882fcad9d88abe46
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
133
Assets/Plugins/GenericController/GenericController.cs
Normal file
@@ -0,0 +1,133 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace WI
|
||||
{
|
||||
public enum ViewMode
|
||||
{
|
||||
None,
|
||||
TopView,
|
||||
PerspectiveView,
|
||||
FirstPersonView,
|
||||
}
|
||||
//TODO::Eat Viewmode
|
||||
[RequireComponent(typeof(Camera))]
|
||||
public abstract class GenericController : MonoBehaviour
|
||||
{
|
||||
public new Camera camera;
|
||||
public GenericControllerOption option;
|
||||
public MaxRangeLimitter maxRangeLimitter = new();
|
||||
protected Vector3 moveVector;
|
||||
protected Vector3 cameraPosition;
|
||||
public Vector3 nextPosition;
|
||||
public Vector3 orthographicOriginPosition;
|
||||
|
||||
public virtual void Awake()
|
||||
{
|
||||
camera = GetComponent<Camera>();
|
||||
option.Apply(this);
|
||||
Collider MaxRange = transform.parent.Find(nameof(MaxRange)).GetComponent<BoxCollider>();
|
||||
maxRangeLimitter.SetRange(MaxRange);
|
||||
}
|
||||
|
||||
public virtual void Movement()
|
||||
{
|
||||
Move();
|
||||
Zoom();
|
||||
Rotate();
|
||||
}
|
||||
protected abstract void Move();
|
||||
protected abstract void Zoom();
|
||||
protected abstract void Rotate();
|
||||
public abstract void LastPositioning(bool limit);
|
||||
public abstract void Rewind();
|
||||
|
||||
protected UserInput input;
|
||||
|
||||
public bool IsClickUI
|
||||
{
|
||||
get
|
||||
{
|
||||
bool result = false;
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
result = EventSystem.current.IsPointerOverGameObject();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsOnTheUI
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsPointerOverExcludedUI())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = EventSystem.current.IsPointerOverGameObject();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
private PointerEventData pointerData;
|
||||
private readonly List<RaycastResult> raycastResults = new List<RaycastResult>();
|
||||
|
||||
bool IsPointerOverExcludedUI()
|
||||
{
|
||||
if (pointerData == null)
|
||||
pointerData = new PointerEventData(EventSystem.current);
|
||||
|
||||
pointerData.position = Input.mousePosition;
|
||||
raycastResults.Clear();
|
||||
EventSystem.current.RaycastAll(pointerData, raycastResults);
|
||||
|
||||
if (raycastResults.Count > 0)
|
||||
{
|
||||
if ((LayerMask.GetMask("Default") & (1 << raycastResults[0].gameObject.layer)) != 0)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool isPressed;
|
||||
protected virtual void LateUpdate()
|
||||
{
|
||||
if (IsPressedUI())
|
||||
return;
|
||||
|
||||
if (IsClickUI)
|
||||
return;
|
||||
|
||||
if (IsOnTheUI)
|
||||
return;
|
||||
|
||||
|
||||
input.GetInput();
|
||||
Movement();
|
||||
var limitCheck = maxRangeLimitter.MoveRangeLimit(nextPosition);
|
||||
LastPositioning(limitCheck);
|
||||
}
|
||||
private bool IsPressedUI()
|
||||
{
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
if (EventSystem.current.IsPointerOverGameObject())
|
||||
{
|
||||
isPressed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetMouseButtonUp(0))
|
||||
{
|
||||
isPressed = false;
|
||||
}
|
||||
return isPressed;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Plugins/GenericController/GenericController.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ffea721820281784f8195cdaac4c6c68
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
78
Assets/Plugins/GenericController/GenericControllerOption.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace WI
|
||||
{
|
||||
public abstract class GenericControllerOption : ScriptableObject, ISerializationCallbackReceiver
|
||||
{
|
||||
[SerializeField]bool _orthographic;
|
||||
[SerializeField]float _moveSensivity;
|
||||
[SerializeField]float _zoomSensivity;
|
||||
[SerializeField]float _rotateSensivity;
|
||||
[SerializeField]float _moveSpeed;
|
||||
[SerializeField]float _zoomSpeed;
|
||||
[SerializeField]float _rotateSpeed;
|
||||
[SerializeField]float _fieldOfView;
|
||||
[SerializeField]bool _moveLimit;
|
||||
[SerializeField]bool _rotateLimit;
|
||||
[SerializeField]bool _azimuthRotateLimit;
|
||||
[SerializeField]bool _elevationRotateLimit;
|
||||
[SerializeField] bool _isFirstPersonView;
|
||||
|
||||
/**initialize Values*/
|
||||
[NonSerialized]
|
||||
public bool orthographic;
|
||||
[NonSerialized]
|
||||
public float moveSensivity;
|
||||
[NonSerialized]
|
||||
public float zoomSensivity;
|
||||
[NonSerialized]
|
||||
public float rotateSensivity;
|
||||
[NonSerialized]
|
||||
public float moveSpeed;
|
||||
[NonSerialized]
|
||||
public float zoomSpeed;
|
||||
[NonSerialized]
|
||||
public float rotateSpeed;
|
||||
[NonSerialized]
|
||||
public float fieldOfView;
|
||||
[NonSerialized]
|
||||
public bool moveLimit;
|
||||
[NonSerialized]
|
||||
public bool rotateLimit;
|
||||
[NonSerialized]
|
||||
public bool azimuthRotateLimit;
|
||||
[NonSerialized]
|
||||
public bool elevationRotateLimit;
|
||||
[NonSerialized]
|
||||
public bool isFirstPersonView;
|
||||
|
||||
public virtual void OnAfterDeserialize()
|
||||
{
|
||||
orthographic = _orthographic;
|
||||
moveSensivity = _moveSensivity;
|
||||
zoomSensivity = _zoomSensivity;
|
||||
rotateSensivity = _rotateSensivity;
|
||||
moveSpeed = _moveSpeed;
|
||||
zoomSpeed = _zoomSpeed;
|
||||
rotateSpeed = _rotateSpeed;
|
||||
fieldOfView = _fieldOfView;
|
||||
moveLimit = _moveLimit;
|
||||
rotateLimit = _rotateLimit;
|
||||
azimuthRotateLimit = _azimuthRotateLimit;
|
||||
elevationRotateLimit = _elevationRotateLimit;
|
||||
isFirstPersonView = _isFirstPersonView;
|
||||
}
|
||||
|
||||
public virtual void Apply(GenericController controller)
|
||||
{
|
||||
controller.camera.orthographic = orthographic;
|
||||
controller.camera.fieldOfView = fieldOfView;
|
||||
}
|
||||
|
||||
public void OnBeforeSerialize()
|
||||
{
|
||||
//throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f577bf79af2c134a872981610d2806d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
28
Assets/Plugins/GenericController/MaxRangeLimitter.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace WI
|
||||
{
|
||||
public class MaxRangeLimitter
|
||||
{
|
||||
public Collider maxRange;
|
||||
|
||||
public void SetRange(Collider maxrRangeCollider)
|
||||
{
|
||||
maxRange = maxrRangeCollider;
|
||||
}
|
||||
|
||||
public bool MoveRangeLimit(Vector3 pos)
|
||||
{
|
||||
if (maxRange == null)
|
||||
return false;
|
||||
|
||||
if (maxRange.bounds.Contains(pos))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Plugins/GenericController/MaxRangeLimitter.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c74d6b8e9cbe1514f80fb2384ea51e38
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Plugins/GenericController/Options.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f68ff29096c80243ad9a2559d426c83
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,43 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0d55d555ae3a31a439ca5986c6199986, type: 3}
|
||||
m_Name: Korea_OrbitalControllerOption
|
||||
m_EditorClassIdentifier:
|
||||
_orthographic: 0
|
||||
_moveSensivity: 0.5
|
||||
_zoomSensivity: 1
|
||||
_rotateSensivity: 10
|
||||
_moveSpeed: 2
|
||||
_zoomSpeed: 60
|
||||
_rotateSpeed: 5
|
||||
_fieldOfView: 60
|
||||
_moveLimit: 0
|
||||
_rotateLimit: 0
|
||||
_azimuthRotateLimit: 0
|
||||
_elevationRotateLimit: 0
|
||||
_isFirstPersonView: 0
|
||||
originElevation: 31.25
|
||||
currentElevation: 56.75
|
||||
elevationSensivity: 15
|
||||
minElevation: 5
|
||||
maxElevation: 90
|
||||
originAzimuth: 30.5
|
||||
currentAzimuth: -73.25
|
||||
azimuthSensivity: 15
|
||||
maxDistance: 60
|
||||
minDistance: 2
|
||||
moveClamper: 0.033333335
|
||||
originDistance: 55
|
||||
originTargetPos: {x: -164.5, y: 93, z: 145}
|
||||
originTargetRot: {x: -0, y: 0, z: 0}
|
||||
currentDistance: 2
|
||||
target: {fileID: 0}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0443d35219f9d1646a57d550cc10e2b9
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,43 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0d55d555ae3a31a439ca5986c6199986, type: 3}
|
||||
m_Name: Vietnam_OrbitalControllerOption 1
|
||||
m_EditorClassIdentifier:
|
||||
_orthographic: 0
|
||||
_moveSensivity: 0.5
|
||||
_zoomSensivity: 1
|
||||
_rotateSensivity: 10
|
||||
_moveSpeed: 2
|
||||
_zoomSpeed: 60
|
||||
_rotateSpeed: 5
|
||||
_fieldOfView: 60
|
||||
_moveLimit: 0
|
||||
_rotateLimit: 0
|
||||
_azimuthRotateLimit: 0
|
||||
_elevationRotateLimit: 0
|
||||
_isFirstPersonView: 0
|
||||
originElevation: 41.25
|
||||
currentElevation: 90
|
||||
elevationSensivity: 15
|
||||
minElevation: 5
|
||||
maxElevation: 90
|
||||
originAzimuth: 37.75
|
||||
currentAzimuth: -90
|
||||
azimuthSensivity: 15
|
||||
maxDistance: 40
|
||||
minDistance: 2
|
||||
moveClamper: 0.48333332
|
||||
originDistance: 26
|
||||
originTargetPos: {x: -164.5, y: 42.5, z: 145}
|
||||
originTargetRot: {x: -0, y: 0, z: 0}
|
||||
currentDistance: 35
|
||||
target: {fileID: 0}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24ee7b1ed2ea45c4eb70f514155c5a49
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Plugins/GenericController/Orbital.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4d0a1fba871007a4e9c3c2c041b47c66
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
16
Assets/Plugins/GenericController/Orbital/CameraEntity.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace WI
|
||||
{
|
||||
[System.Serializable]
|
||||
public class CameraEntity
|
||||
{
|
||||
public float x;
|
||||
public float y;
|
||||
public float z;
|
||||
public float distance;
|
||||
public float elevation;
|
||||
public float azimuth;
|
||||
public int floorIndex;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: db7ea094b0ebba741893718f5fbfcbaa
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
397
Assets/Plugins/GenericController/Orbital/OrbitalController.cs
Normal file
@@ -0,0 +1,397 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace WI
|
||||
{
|
||||
//TODO::Something... Util Functions
|
||||
public class OrbitalController : GenericController
|
||||
{
|
||||
public new OrbitalControllerOption option => base.option as OrbitalControllerOption;
|
||||
public Dictionary<ViewMode, CameraEntity> saveTargetPositions = new Dictionary<ViewMode, CameraEntity>();
|
||||
|
||||
public Action<int> ZoomInOutEvent;
|
||||
public int maxValue;
|
||||
public float duration_MoveToCamera;
|
||||
public float speed_MoveToCamera;
|
||||
public float process;
|
||||
public float yUpPos;
|
||||
public float runSpeed;
|
||||
float timer;
|
||||
|
||||
public KeyCode up;
|
||||
public KeyCode down;
|
||||
public KeyCode left;
|
||||
public KeyCode right;
|
||||
public KeyCode run;
|
||||
public KeyCode targetVisualization;
|
||||
|
||||
public ViewMode viewMode;
|
||||
|
||||
public Action<RaycastHit[], Transform> onPerspectiveView;
|
||||
public Action<RaycastHit> onFirstPersonViewRay;
|
||||
public Action<ViewMode> onChangeViewMode;
|
||||
|
||||
public float targetColliderRadius;
|
||||
|
||||
public override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
targetColliderRadius = option.target.GetComponent<SphereCollider>().radius;
|
||||
|
||||
foreach(ViewMode mode in Enum.GetValues(typeof(ViewMode)))
|
||||
{
|
||||
saveTargetPositions.Add(mode, null);
|
||||
}
|
||||
SetViewMode(ViewMode.PerspectiveView);
|
||||
}
|
||||
|
||||
public override void Movement()
|
||||
{
|
||||
if (option.isFirstPersonView)
|
||||
return;
|
||||
|
||||
nextPosition = option.target.position;
|
||||
|
||||
Zoom();
|
||||
Rotate();
|
||||
Move();
|
||||
//FindLookAtObject();
|
||||
}
|
||||
|
||||
protected override void Move()
|
||||
{
|
||||
if (option.moveLimit)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!input.leftClick)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
moveVector = Vector3.zero;
|
||||
|
||||
var mouseYsen = input.mouseY * option.elevationSensivity;
|
||||
|
||||
float y = mouseYsen * ((option.maxElevation - option.minElevation) / option.currentElevation);
|
||||
float z = mouseYsen * ((option.minElevation - option.currentElevation) / option.maxElevation);
|
||||
|
||||
moveVector = transform.TransformDirection(input.mouseX * option.elevationSensivity, y, z);
|
||||
moveVector.y = 0;
|
||||
|
||||
var t = option.currentDistance / option.maxDistance;
|
||||
option.moveClamper = Mathf.Min(t, 1f);
|
||||
moveVector *= option.moveClamper * option.moveSpeed * option.moveSensivity;
|
||||
nextPosition = option.target.position - moveVector;
|
||||
}
|
||||
|
||||
Vector3 CalculateMovePosition(Vector3 origPos, Vector3 moveVec)
|
||||
{
|
||||
if (moveVec == Vector3.zero)
|
||||
return origPos;
|
||||
|
||||
float moveDist = moveVec.magnitude;
|
||||
Vector3 destPos = origPos + moveVec;
|
||||
|
||||
int wallMask = LayerMask.GetMask("Floor Wall");
|
||||
|
||||
Collider[] hitColliders = Physics.OverlapSphere(destPos, targetColliderRadius, wallMask);
|
||||
if (hitColliders.Length > 0)
|
||||
{
|
||||
RaycastHit[] raycastHits = Physics.SphereCastAll(origPos, targetColliderRadius, moveVec, moveDist + 0.11f, wallMask);
|
||||
if (raycastHits.Length > 0)
|
||||
{
|
||||
foreach (RaycastHit hit in raycastHits)
|
||||
{
|
||||
moveVec -= hit.normal * Vector3.Dot(hit.normal, moveVec);
|
||||
}
|
||||
}
|
||||
}
|
||||
return origPos + moveVec;
|
||||
}
|
||||
|
||||
protected override void Zoom()
|
||||
{
|
||||
if (option.isFirstPersonView)
|
||||
return;
|
||||
|
||||
camera.orthographicSize = camera.orthographic ? option.currentDistance : 0f;
|
||||
|
||||
var nextDistance = option.currentDistance - input.mouseWheel * option.zoomSpeed;
|
||||
option.currentDistance = Mathf.Lerp(option.currentDistance, nextDistance, option.zoomSpeed * Time.deltaTime);
|
||||
option.currentDistance = Mathf.Clamp(option.currentDistance, option.minDistance, option.maxDistance);
|
||||
|
||||
camera.orthographicSize = Mathf.Clamp(option.currentDistance, option.minDistance, option.maxDistance);
|
||||
var syncValue = -(maxValue * (option.currentDistance - option.maxDistance) / option.maxDistance);
|
||||
ZoomInOutEvent?.Invoke(Mathf.RoundToInt(syncValue));
|
||||
}
|
||||
|
||||
//TODO:: Into Member Methods... anywhere
|
||||
public void SliderZoomInOut(int value)
|
||||
{
|
||||
camera.orthographicSize = camera.orthographic ? option.currentDistance : 0f;
|
||||
|
||||
var nextDistance = option.maxDistance - (option.maxDistance / maxValue * value);
|
||||
var lerpDistance = Mathf.Lerp(option.currentDistance, nextDistance, option.zoomSpeed * Time.deltaTime);
|
||||
option.currentDistance = Mathf.Clamp(lerpDistance, option.minDistance, option.maxDistance);
|
||||
camera.orthographicSize = Mathf.Clamp(option.currentDistance, option.minDistance, option.maxDistance);
|
||||
}
|
||||
|
||||
protected override void Rotate()
|
||||
{
|
||||
if (option.rotateLimit)
|
||||
return;
|
||||
|
||||
if (!input.rightClick)
|
||||
return;
|
||||
|
||||
AzimuthControl();
|
||||
ElevationControl();
|
||||
}
|
||||
protected void AzimuthControl()
|
||||
{
|
||||
if (option.azimuthRotateLimit)
|
||||
return;
|
||||
|
||||
option.currentAzimuth += input.mouseX * option.rotateSpeed;
|
||||
option.currentAzimuth %= 360;
|
||||
}
|
||||
|
||||
protected void ElevationControl()
|
||||
{
|
||||
if (option.orthographic)
|
||||
return;
|
||||
|
||||
if (option.elevationRotateLimit)
|
||||
return;
|
||||
|
||||
option.currentElevation -= input.mouseY * option.rotateSpeed;
|
||||
option.currentElevation = Mathf.Clamp(option.currentElevation, option.minElevation, option.maxElevation);
|
||||
}
|
||||
|
||||
public override void LastPositioning(bool limit)
|
||||
{
|
||||
if (!limit)
|
||||
return;
|
||||
|
||||
option.target.position = nextPosition;
|
||||
var dist = new Vector3(0, 0, -option.currentDistance);
|
||||
var distPos = Quaternion.Euler(option.currentElevation, option.currentAzimuth, 0f) * dist;
|
||||
cameraPosition = nextPosition + distPos;
|
||||
camera.transform.position = cameraPosition;
|
||||
camera.orthographicSize = Mathf.Clamp(option.currentDistance, option.minDistance, option.maxDistance);
|
||||
|
||||
if (option.currentElevation <= 90f)
|
||||
{
|
||||
camera.transform.rotation = Quaternion.Euler(option.currentElevation, option.currentAzimuth, 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
camera.transform.LookAt(option.target);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Rewind()
|
||||
{
|
||||
option.target.position = option.originTargetPos;
|
||||
option.target.eulerAngles = option.originTargetRot;
|
||||
option.currentDistance = option.originDistance;
|
||||
option.currentElevation = option.originElevation;
|
||||
option.currentAzimuth = option.originAzimuth;
|
||||
var dist = new Vector3(0, 0, -option.currentDistance);
|
||||
var distPos = Quaternion.Euler(option.currentElevation, option.currentAzimuth, 0f) * dist;
|
||||
cameraPosition = option.target.position + distPos;
|
||||
camera.transform.position = cameraPosition;
|
||||
camera.transform.LookAt(option.target);
|
||||
}
|
||||
|
||||
void ProcessWinding()
|
||||
{
|
||||
if (process > 0f)
|
||||
{
|
||||
process = 1f - process;
|
||||
}
|
||||
}
|
||||
|
||||
public void SmoothMove(Vector3 pos, float distance, float elevation, float azimuth)
|
||||
{
|
||||
StopAllCoroutines();
|
||||
StartCoroutine(SmoothMoving(pos, distance, elevation, azimuth));
|
||||
}
|
||||
|
||||
IEnumerator SmoothMoving(Vector3 pos, float distance, float elevation, float azimuth)
|
||||
{
|
||||
ProcessWinding();
|
||||
while (process < 1f)
|
||||
{
|
||||
timer += speed_MoveToCamera * Time.deltaTime;
|
||||
process += timer / duration_MoveToCamera;
|
||||
MoveToCamera(pos, distance, elevation, azimuth);
|
||||
yield return null;
|
||||
}
|
||||
timer = 0f;
|
||||
}
|
||||
void MoveToCamera(Vector3 pos, float distance, float elevation, float azimuth)
|
||||
{
|
||||
option.target.position = Vector3.Lerp(option.target.position, pos, process);
|
||||
option.currentDistance = Mathf.Lerp(option.currentDistance, distance, process);
|
||||
option.currentElevation = Mathf.LerpAngle(option.currentElevation, elevation, process);
|
||||
option.currentAzimuth = Mathf.LerpAngle(option.currentAzimuth, azimuth, process);
|
||||
|
||||
CameraFix();
|
||||
}
|
||||
|
||||
public void CameraFix()
|
||||
{
|
||||
//option.target.position = nextPostion;
|
||||
var dist = new Vector3(0, 0, -option.currentDistance);
|
||||
//option.outlineCamera.orthographicSize = option.currentDistance;
|
||||
cameraPosition = option.target.position + Quaternion.Euler(option.currentElevation, option.currentAzimuth, 0f) * dist;
|
||||
camera.transform.position = cameraPosition;
|
||||
camera.transform.LookAt(option.target);
|
||||
}
|
||||
|
||||
public void SetViewMode(ViewMode mode)
|
||||
{
|
||||
viewMode = mode;
|
||||
switch (mode)
|
||||
{
|
||||
case ViewMode.None:
|
||||
break;
|
||||
case ViewMode.TopView:
|
||||
camera.orthographic = true;
|
||||
option.orthographic = true;
|
||||
option.isFirstPersonView = false;
|
||||
CameraTopView();
|
||||
break;
|
||||
case ViewMode.PerspectiveView:
|
||||
camera.orthographic = false;
|
||||
option.orthographic = false;
|
||||
option.isFirstPersonView = false;
|
||||
CameraPerspectiveView();
|
||||
break;
|
||||
case ViewMode.FirstPersonView:
|
||||
camera.orthographic = false;
|
||||
option.orthographic = false;
|
||||
option.isFirstPersonView = true;
|
||||
CameraFirstPersonView();
|
||||
break;
|
||||
}
|
||||
onChangeViewMode?.Invoke(viewMode);
|
||||
}
|
||||
public void CameraTopView()
|
||||
{
|
||||
var saveData = saveTargetPositions[ViewMode.TopView];
|
||||
|
||||
if (saveData == null)
|
||||
{
|
||||
nextPosition = orthographicOriginPosition;
|
||||
option.currentElevation = 90f;
|
||||
option.currentDistance = 35f;
|
||||
option.currentAzimuth = -90f;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCameraData(viewMode);
|
||||
}
|
||||
|
||||
LastPositioning(true);
|
||||
}
|
||||
public void CameraFirstPersonView()
|
||||
{
|
||||
var saveData = saveTargetPositions[ViewMode.FirstPersonView];
|
||||
|
||||
if (saveData == null)
|
||||
{
|
||||
camera.transform.position = option.target.position;
|
||||
option.currentDistance = 5f;
|
||||
option.currentElevation = 0f;
|
||||
option.currentAzimuth = 0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCameraData(viewMode);
|
||||
}
|
||||
|
||||
LastPositioning(true);
|
||||
}
|
||||
public void CameraPerspectiveView()
|
||||
{
|
||||
var saveData = saveTargetPositions[ViewMode.PerspectiveView];
|
||||
|
||||
if (saveData == null)
|
||||
{
|
||||
option.currentDistance = option.originDistance;
|
||||
option.currentAzimuth = option.originAzimuth;
|
||||
option.currentElevation = option.originElevation;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCameraData(viewMode);
|
||||
}
|
||||
|
||||
LastPositioning(true);
|
||||
}
|
||||
public void SetTargetPos(Vector3 pos)
|
||||
{
|
||||
nextPosition = pos;
|
||||
LastPositioning(true);
|
||||
}
|
||||
private void FindLookAtObject()
|
||||
{
|
||||
switch(viewMode)
|
||||
{
|
||||
case ViewMode.PerspectiveView:
|
||||
PerspectiveViewCenterRay();
|
||||
break;
|
||||
case ViewMode.FirstPersonView:
|
||||
FirstPersonViewRay();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void PerspectiveViewCenterRay()
|
||||
{
|
||||
var dir = option.target.position - camera.transform.localPosition;
|
||||
var distance = Vector3.Distance(option.target.position, camera.transform.localPosition);
|
||||
var hits = Physics.RaycastAll(camera.transform.position, dir, distance);
|
||||
//Debug.DrawRay(camera.transform.position, dir * distance, Color.blue);
|
||||
onPerspectiveView?.Invoke(hits, option.target);
|
||||
}
|
||||
|
||||
private void FirstPersonViewRay()
|
||||
{
|
||||
if (Physics.Raycast(camera.transform.position, transform.forward, out RaycastHit hit, Mathf.Infinity))
|
||||
{
|
||||
onFirstPersonViewRay?.Invoke(hit);
|
||||
}
|
||||
}
|
||||
public void SaveTargetPosition(int floorIndex)
|
||||
{
|
||||
var cameraEntity = new CameraEntity();
|
||||
cameraEntity.x = option.target.position.x;
|
||||
cameraEntity.y = option.target.position.y;
|
||||
cameraEntity.z = option.target.position.z;
|
||||
cameraEntity.distance = option.currentDistance;
|
||||
cameraEntity.azimuth = option.currentAzimuth;
|
||||
cameraEntity.elevation = option.currentElevation;
|
||||
cameraEntity.floorIndex = floorIndex;
|
||||
|
||||
saveTargetPositions[viewMode] = cameraEntity;
|
||||
}
|
||||
private void SetCameraData(ViewMode currentViewMode)
|
||||
{
|
||||
var cameraData = saveTargetPositions[currentViewMode];
|
||||
|
||||
nextPosition = new Vector3(cameraData.x, cameraData.y, cameraData.z);
|
||||
option.currentDistance = cameraData.distance;
|
||||
option.currentAzimuth = cameraData.azimuth;
|
||||
option.currentElevation = cameraData.elevation;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fafd8d68ae7258c4485adb2fffef3373
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace WI
|
||||
{
|
||||
|
||||
[CreateAssetMenu(fileName = "OrbitalControllerOption", menuName = "GenericControllerOption/OrbitalControllerOption")]
|
||||
public class OrbitalControllerOption : GenericControllerOption
|
||||
{
|
||||
[Header("Elevation")]
|
||||
public float originElevation;
|
||||
public float currentElevation;
|
||||
public float elevationSensivity;
|
||||
public float minElevation;
|
||||
public float maxElevation;
|
||||
|
||||
[Header("Azimuth")]
|
||||
public float originAzimuth;
|
||||
public float currentAzimuth;
|
||||
public float azimuthSensivity;
|
||||
public float maxDistance;
|
||||
public float minDistance;
|
||||
public float moveClamper;
|
||||
|
||||
public float originDistance;
|
||||
|
||||
public Vector3 originTargetPos;
|
||||
public Vector3 originTargetRot;
|
||||
public float currentDistance;
|
||||
public Transform target;
|
||||
//public Camera outlineCamera;
|
||||
|
||||
public override void Apply(GenericController controller)
|
||||
{
|
||||
target = FindAnyObjectByType<OrbitalControllerTarget>().transform;
|
||||
//outlineCamera = FindObjectOfType<OutlineCamera>().outlineCamera;
|
||||
base.Apply(controller);
|
||||
originTargetPos = target.position;
|
||||
originTargetRot = target.eulerAngles;
|
||||
currentAzimuth = originAzimuth;
|
||||
currentDistance = originDistance;
|
||||
currentElevation = originElevation;
|
||||
//outlineCamera.orthographicSize = originDistance;
|
||||
}
|
||||
public override void OnAfterDeserialize()
|
||||
{
|
||||
base.OnAfterDeserialize();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0d55d555ae3a31a439ca5986c6199986
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
namespace WI
|
||||
{
|
||||
public class OrbitalControllerTarget : MonoBehaviour
|
||||
{
|
||||
OrbitalController controller;
|
||||
OrbitalControllerOption option;
|
||||
|
||||
public bool alwaysActive = false;
|
||||
public bool active = false;
|
||||
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
controller = FindAnyObjectByType<OrbitalController>();
|
||||
option = controller.option;
|
||||
}
|
||||
|
||||
private void OnTriggerStay(Collider floorWall)
|
||||
{
|
||||
if (controller.viewMode != ViewMode.FirstPersonView)
|
||||
return;
|
||||
|
||||
SetPosToOutsideWall(floorWall);
|
||||
}
|
||||
|
||||
void SetPosToOutsideWall(Collider floorWall)
|
||||
{
|
||||
if (floorWall.gameObject.layer.Equals(LayerMask.NameToLayer("Floor Wall")))
|
||||
{
|
||||
Vector3 hitCenter = floorWall.bounds.center;
|
||||
float sizeX = floorWall.bounds.size.x;
|
||||
float sizeZ = floorWall.bounds.size.z;
|
||||
|
||||
Vector3 vectorPoint = Vector3.zero;
|
||||
|
||||
if (sizeX > sizeZ)
|
||||
{
|
||||
vectorPoint = new Vector3(transform.position.x, transform.position.y, hitCenter.z);
|
||||
}
|
||||
else
|
||||
{
|
||||
vectorPoint = new Vector3(hitCenter.x, transform.position.y, transform.position.z);
|
||||
}
|
||||
|
||||
Vector3 direction = transform.position - vectorPoint;
|
||||
float radius = GetComponent<SphereCollider>().radius;
|
||||
|
||||
transform.position += direction * radius;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eab1a07f8f5c6754a8f2a9789fb6b020
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
12
Assets/Plugins/GenericController/Orbital/OutlineCamera.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace WI
|
||||
{
|
||||
public class OutlineCamera : MonoBehaviour
|
||||
{
|
||||
public Camera outlineCamera;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: afa268d7e935a6844be5d4fabd0fed3d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
402
Assets/Plugins/GenericController/Raycaster.cs
Normal file
@@ -0,0 +1,402 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor.Presets;
|
||||
#endif
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace WI
|
||||
{
|
||||
[DefaultExecutionOrder(int.MinValue)]
|
||||
public class Raycaster : MonoBehaviour
|
||||
{
|
||||
PointerEventData pointerEvent = new(EventSystem.current);
|
||||
List<RaycastResult> uiRaycastResults = new();
|
||||
RaycastHit[] hitInfo = new RaycastHit[16];
|
||||
RaycastHit[] tempInfo;
|
||||
HashSet<Type> typeLayers = new();
|
||||
Dictionary<Type, Action<RaycastHit, Component>> onExitEvent = new();
|
||||
Dictionary<Type, Action<RaycastHit, Component>> onStayEvent = new();
|
||||
Dictionary<Type, Action<RaycastHit, Component>> onEnterEvent = new();
|
||||
Dictionary<Type, Action<RaycastHit, Component>> onLeftClickEvent = new();
|
||||
Dictionary<Type, Action<RaycastHit, Component>> onRightClickEvent = new();
|
||||
|
||||
Dictionary<Type, Action<RaycastHit, Component>> onLeftClickFirst = new();
|
||||
Dictionary<Type, Action<RaycastHit, Component>> onRightClickFirst = new();
|
||||
Dictionary<Type, Action<RaycastHit, Component>> onEnterFirst = new();
|
||||
Dictionary<Type, Action<RaycastHit, Component>> onStayFirst = new();
|
||||
Dictionary<Type, Action<RaycastHit, Component>> onExitFirst = new();
|
||||
|
||||
bool onLeftClick;
|
||||
bool onRightClick;
|
||||
Dictionary<Type, RaycastHit> firstHit = new();
|
||||
Dictionary<Type, RaycastHit> tempFirstHit = new();
|
||||
Dictionary<Transform, RaycastHit> fth = new();
|
||||
|
||||
int hitCount;
|
||||
|
||||
Camera cam;
|
||||
public RaycastHit hit => hitInfo[0];
|
||||
HashSet<Transform> hitTransform = new();
|
||||
HashSet<Transform> tempHit = new();
|
||||
Dictionary<Transform, RaycastHit> transformToHitinfo = new();
|
||||
List<(Action<RaycastHit, Component>, RaycastHit, Component)> eventList = new();
|
||||
|
||||
public float uiHoverTime;
|
||||
float uiHoverTimer;
|
||||
#pragma warning disable IDE0044 // 읽기 전용 한정자 추가
|
||||
#pragma warning disable CS0649 // 'Raycaster.onUIHoverEvent' 필드에는 할당되지 않으므로 항상 null 기본값을 사용합니다.
|
||||
Action<RaycastResult> onUIHoverEvent;
|
||||
#pragma warning restore CS0649
|
||||
#pragma warning restore IDE0044
|
||||
GameObject prevOnUI;
|
||||
|
||||
|
||||
void Awake()
|
||||
{
|
||||
cam = Camera.main;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
UIRaycast();
|
||||
PhysicsRaycast();
|
||||
EventInvoking();
|
||||
}
|
||||
|
||||
void EventInvoking()
|
||||
{
|
||||
foreach(var e in eventList)
|
||||
{
|
||||
e.Item1.Invoke(e.Item2, e.Item3);
|
||||
}
|
||||
eventList.Clear();
|
||||
}
|
||||
void UIRaycast()
|
||||
{
|
||||
pointerEvent.position = Input.mousePosition;
|
||||
EventSystem.current.RaycastAll(pointerEvent, uiRaycastResults);
|
||||
|
||||
if(uiRaycastResults.Count != 0)
|
||||
{
|
||||
if (uiRaycastResults[0].gameObject == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (prevOnUI != uiRaycastResults[0].gameObject)
|
||||
{
|
||||
uiHoverTimer = 0f;
|
||||
prevOnUI = uiRaycastResults[0].gameObject;
|
||||
}
|
||||
|
||||
if (uiHoverTimer >= uiHoverTime)
|
||||
{
|
||||
onUIHoverEvent?.Invoke(uiRaycastResults[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
uiHoverTimer += Time.deltaTime;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
prevOnUI = null;
|
||||
}
|
||||
}
|
||||
|
||||
void PhysicsRaycast()
|
||||
{
|
||||
onLeftClick = Input.GetMouseButtonDown(0);
|
||||
onRightClick = Input.GetMouseButtonDown(1);
|
||||
Rayfire();
|
||||
SingleCasting();
|
||||
MultiCasting();
|
||||
}
|
||||
|
||||
void Rayfire()
|
||||
{
|
||||
var ray = cam.ScreenPointToRay(Input.mousePosition);
|
||||
//Physics.Raycast(ray, out singleHit, Mathf.Infinity);
|
||||
tempInfo = new RaycastHit[16];
|
||||
hitCount = Physics.RaycastNonAlloc(ray, tempInfo, Mathf.Infinity);
|
||||
hitInfo = SortingHitInfos(tempInfo);
|
||||
}
|
||||
|
||||
public bool Casting(LayerMask layer, out RaycastHit hit)
|
||||
{
|
||||
hit = new RaycastHit();
|
||||
if (hitCount == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (var h in hitInfo)
|
||||
{
|
||||
if (h.transform == null)
|
||||
continue;
|
||||
|
||||
if ((layer.value >> h.transform.gameObject.layer) == 1)
|
||||
{
|
||||
hit = h;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void SingleCasting(in RaycastHit hitInfo)
|
||||
{
|
||||
fth.TryAdd(hitInfo.transform, hitInfo);
|
||||
|
||||
foreach (var tl in typeLayers)
|
||||
{
|
||||
SingleCasting(hitInfo, tl);
|
||||
}
|
||||
}
|
||||
|
||||
void SingleCasting(in RaycastHit hitInfo, Type tl)
|
||||
{
|
||||
if (tempFirstHit.ContainsKey(tl))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!hitInfo.transform.TryGetComponent(tl, out var value))
|
||||
return;
|
||||
|
||||
if (firstHit.Remove(tl, out var prev))
|
||||
{
|
||||
if (prev.transform == hitInfo.transform)
|
||||
{
|
||||
//Debug.Log($"OnStayFirst : {prev.transform.name}");
|
||||
EventInvoke(onStayFirst, tl, hitInfo, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Debug.Log($"OnExitFirst : {prev.transform.name}");
|
||||
EventInvoke(onExitFirst, tl, prev, prev.transform.GetComponent(tl));
|
||||
|
||||
//Debug.Log($"OnEnterFirst : {hitInfo.transform.name}");
|
||||
EventInvoke(onEnterFirst, tl, hitInfo, value);
|
||||
fth.Remove(prev.transform);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Debug.Log($"OnEnterFirst : {hitInfo.transform.name}");
|
||||
|
||||
EventInvoke(onEnterFirst, tl, hitInfo, value);
|
||||
}
|
||||
fth[hitInfo.transform] = hitInfo;
|
||||
tempFirstHit.Add(tl, hitInfo);
|
||||
}
|
||||
|
||||
void SingleCasting()
|
||||
{
|
||||
//fth.Clear();
|
||||
tempFirstHit.Clear();
|
||||
for (int i = 0; i < hitCount; ++i)
|
||||
{
|
||||
SingleCasting(hitInfo[i]);
|
||||
}
|
||||
|
||||
FirstExitEvent();
|
||||
FirstClickEvent();
|
||||
}
|
||||
void FirstClickEvent()
|
||||
{
|
||||
|
||||
foreach (var p in tempFirstHit)
|
||||
{
|
||||
firstHit.Add(p.Key, p.Value);
|
||||
|
||||
if (onLeftClick)
|
||||
{
|
||||
EventInvoke(onLeftClickFirst, p.Key, p.Value, p.Value.transform.GetComponent(p.Key));
|
||||
}
|
||||
if (onRightClick)
|
||||
{
|
||||
EventInvoke(onRightClickFirst, p.Key, p.Value, p.Value.transform.GetComponent(p.Key));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FirstExitEvent()
|
||||
{
|
||||
foreach (var f in firstHit)
|
||||
{
|
||||
//Debug.Log($"OnExitFirst :{f.Value.transform.name}");
|
||||
if (f.Value.transform == null)
|
||||
continue;
|
||||
|
||||
EventInvoke(onExitFirst, f.Key, f.Value, f.Value.transform.GetComponent(f.Key));
|
||||
fth.Remove(f.Value.transform);
|
||||
//tempFirstHit.Remove(f.Key);
|
||||
}
|
||||
firstHit.Clear();
|
||||
}
|
||||
|
||||
RaycastHit[] SortingHitInfos(in RaycastHit[] hitInfo)
|
||||
{
|
||||
if (hitInfo[0].transform == null)
|
||||
return null;
|
||||
|
||||
var sortHitInfo = hitInfo.Where(hi => hi.transform != null).OrderBy(hi => hi.distance).ToArray();
|
||||
//var sortHitInfo = hitInfo.OrderBy(hi => hi.distance).ToArray();
|
||||
|
||||
return sortHitInfo;
|
||||
}
|
||||
|
||||
void HitCheck(int hitIndex)
|
||||
{
|
||||
var ht = hitInfo[hitIndex].transform;
|
||||
tempHit.Add(ht);
|
||||
transformToHitinfo.TryAdd(ht, hitInfo[hitIndex]);
|
||||
bool isStay = hitTransform.Remove(ht);
|
||||
|
||||
foreach (var tl in typeLayers)
|
||||
{
|
||||
if (!ht.TryGetComponent(tl, out var value))
|
||||
continue;
|
||||
|
||||
if (onLeftClick)
|
||||
{
|
||||
EventInvoke(onLeftClickEvent, tl, hitInfo[hitIndex], value);
|
||||
//Debug.Log($"OnClick {tl} {value}");
|
||||
}
|
||||
if (onRightClick)
|
||||
{
|
||||
EventInvoke(onRightClickEvent, tl, hitInfo[hitIndex], value);
|
||||
}
|
||||
|
||||
if (!isStay)
|
||||
{
|
||||
//Debug.Log($"OnEnter {tl} {value}");
|
||||
EventInvoke(onEnterEvent, tl, hitInfo[hitIndex], value);
|
||||
}
|
||||
else
|
||||
{
|
||||
EventInvoke(onStayEvent, tl, hitInfo[hitIndex], value);
|
||||
//Debug.Log($"OnStay {tl} {value}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MultiCasting()
|
||||
{
|
||||
tempHit.Clear();
|
||||
for (int i = 0; i < hitCount; ++i)
|
||||
{
|
||||
HitCheck(i);
|
||||
}
|
||||
|
||||
foreach (var h in hitTransform)
|
||||
{
|
||||
if (h == null)
|
||||
continue;
|
||||
foreach (var tl in typeLayers)
|
||||
{
|
||||
if (!h.TryGetComponent(tl, out var value))
|
||||
continue;
|
||||
|
||||
EventInvoke(onExitEvent, tl, transformToHitinfo[h], value);
|
||||
}
|
||||
transformToHitinfo.Remove(h);
|
||||
}
|
||||
|
||||
hitTransform.Clear();
|
||||
foreach (var p in tempHit)
|
||||
{
|
||||
hitTransform.Add(p);
|
||||
}
|
||||
}
|
||||
void EventInvoke(Dictionary<Type, Action<RaycastHit, Component>> eventTable, Type layer, in RaycastHit hitInfo, Component value)
|
||||
{
|
||||
if (eventTable.TryGetValue(layer, out var action))
|
||||
{
|
||||
eventList.Add((action,hitInfo, value));
|
||||
//action?.Invoke(hitInfo, value);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsFirstHit(Transform target)
|
||||
{
|
||||
if (hitInfo.Length == 0)
|
||||
return false;
|
||||
return hitInfo[0].transform == target;
|
||||
}
|
||||
|
||||
public void AddTypeLayer(Type t)
|
||||
{
|
||||
typeLayers.Add(t);
|
||||
typeLayers.RemoveWhere(t => t == null);
|
||||
}
|
||||
|
||||
public void RemoveTypeLayer<T>()
|
||||
{
|
||||
typeLayers.Remove(typeof(T));
|
||||
}
|
||||
|
||||
public void AddEvent_FirstEnter(Type layer, Action<RaycastHit, Component> action)
|
||||
{
|
||||
onEnterFirst.TryAdd(layer, null);
|
||||
onEnterFirst[layer] += action;
|
||||
}
|
||||
|
||||
public void AddEvent_FirstExit(Type layer, Action<RaycastHit, Component> action)
|
||||
{
|
||||
onExitFirst.TryAdd(layer, null);
|
||||
onExitFirst[layer] += action;
|
||||
}
|
||||
|
||||
public void AddEvent_FirstStay(Type layer, Action<RaycastHit, Component> action)
|
||||
{
|
||||
onStayFirst.TryAdd(layer, null);
|
||||
onStayFirst[layer] += action;
|
||||
}
|
||||
|
||||
public void AddEvent_FirstLeftClick(Type layer, Action<RaycastHit, Component> action)
|
||||
{
|
||||
onLeftClickFirst.TryAdd(layer, null);
|
||||
onLeftClickFirst[layer] += action;
|
||||
}
|
||||
|
||||
public void AddEvent_FirstRightClick(Type layer, Action<RaycastHit, Component> action)
|
||||
{
|
||||
onRightClickFirst.TryAdd(layer, null);
|
||||
onRightClickFirst[layer] += action;
|
||||
}
|
||||
|
||||
public void AddEvent_RightClick(Type layer, Action<RaycastHit, Component> action)
|
||||
{
|
||||
onRightClickEvent.TryAdd(layer, null);
|
||||
onRightClickEvent[layer] += action;
|
||||
}
|
||||
|
||||
public void AddEvent_Enter(Type layer, Action<RaycastHit, Component> action)
|
||||
{
|
||||
onEnterEvent.TryAdd(layer, null);
|
||||
onEnterEvent[layer] += action;
|
||||
}
|
||||
|
||||
public void AddEvent_Exit(Type layer, Action<RaycastHit, Component> action)
|
||||
{
|
||||
onExitEvent.TryAdd(layer, null);
|
||||
onExitEvent[layer] += action;
|
||||
}
|
||||
|
||||
public void AddEvent_Stay(Type layer, Action<RaycastHit, Component> action)
|
||||
{
|
||||
onStayEvent.TryAdd(layer, null);
|
||||
onStayEvent[layer] += action;
|
||||
}
|
||||
|
||||
public void AddEvent_LeftClick(Type layer, Action<RaycastHit, Component> action)
|
||||
{
|
||||
onLeftClickEvent.TryAdd(layer, null);
|
||||
onLeftClickEvent[layer] += action;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Plugins/GenericController/Raycaster.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73c8199685949fb4eb02e83a235ec68b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
32
Assets/Plugins/GenericController/UserInput.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using UnityEngine;
|
||||
|
||||
public struct UserInput
|
||||
{
|
||||
public bool leftClick;
|
||||
public bool rightClick;
|
||||
public bool wheelClick;
|
||||
public bool onClick;
|
||||
public float mouseX;
|
||||
public float mouseY;
|
||||
public float mouseWheel;
|
||||
public float keyboardX;
|
||||
public float keyboardY;
|
||||
|
||||
public void GetInput()
|
||||
{
|
||||
leftClick = Input.GetMouseButton(0);
|
||||
rightClick = Input.GetMouseButton(1);
|
||||
wheelClick = Input.GetMouseButton(2);
|
||||
|
||||
onClick = leftClick || rightClick || wheelClick;
|
||||
|
||||
mouseX = Input.GetAxis("Mouse X");
|
||||
mouseY = Input.GetAxis("Mouse Y");
|
||||
mouseWheel = Input.GetAxis("Mouse ScrollWheel");
|
||||
|
||||
keyboardX = Input.GetAxis("Horizontal");
|
||||
keyboardY = Input.GetAxis("Vertical");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
11
Assets/Plugins/GenericController/UserInput.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35d86d64dfcada645b679ce92e676e20
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Plugins/RenderHeads.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a047090ffbc30549bd369a870f832e0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Plugins/RenderHeads/AVProMovieCapture.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15dfaaef31058bf4db2a67395455bd28
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Plugins/RenderHeads/AVProMovieCapture/Demos.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94f9e072b7bf8b4419ce9835aa43a5c5
|
||||
folderAsset: yes
|
||||
timeCreated: 1563637382
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "RenderHeads.AVProMovieCapture.Demos",
|
||||
"references": [ "RenderHeads.AVProMovieCapture.Runtime" ],
|
||||
"includePlatforms": [ ]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8426b3d3473738a489355e04a0882d0b
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76c2bb32661761d40b39ce23b8dbb860
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
||||
@@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 764908f8332f02340b72e3010f4a3a2e
|
||||
timeCreated: 1606868176
|
||||
licenseType: Store
|
||||
AudioImporter:
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 0
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 0
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bec3644980842774db12d11690b0d916
|
||||
AudioImporter:
|
||||
serializedVersion: 4
|
||||
format: -1
|
||||
quality: .5
|
||||
stream: 1
|
||||
3D: 0
|
||||
forceToMono: 0
|
||||
useHardware: 0
|
||||
loopable: 0
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 1
|
||||
guid: 1ed2bddd186bb264eb42d8ac765accd4
|
||||
AudioImporter:
|
||||
importerVersion: 4
|
||||
format: -1
|
||||
quality: -1
|
||||
3d: 0
|
||||
forceToMono: 0
|
||||
stream: 1
|
||||
useHardware: 0
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bc925b9c371f92e40bf7355ee0dc2536
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 1
|
||||
guid: eb821627fb1a0c044a6fd7a6dabe3147
|
||||
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1102003ee10456942bffb2b369d6a7b8
|
||||
TrueTypeFontImporter:
|
||||
serializedVersion: 2
|
||||
fontSize: 16
|
||||
fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
forceTextureCase: -2
|
||||
renderMode: 0
|
||||
style: 0
|
||||
includeFontData: 1
|
||||
use2xBehaviour: 0
|
||||
fontNames: []
|
||||
customCharacters:
|
||||
BIN
Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/black.png
Normal file
|
After Width: | Height: | Size: 167 B |
@@ -0,0 +1,47 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41dc463a61e06694b85593cb70e17848
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 32
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
BIN
Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray.png
Normal file
|
After Width: | Height: | Size: 163 B |
@@ -0,0 +1,47 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89756d2e84d7799499b64043123ddf38
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 32
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
|
After Width: | Height: | Size: 163 B |
@@ -0,0 +1,47 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5fa7bcd58e1876e41952c9349da60879
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 32
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
|
After Width: | Height: | Size: 163 B |
@@ -0,0 +1,47 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b6b9f1741e3bb6241aab55422ae1f133
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 32
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
|
After Width: | Height: | Size: 163 B |
@@ -0,0 +1,47 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ccce2d09cdddb2d4da068267090c1548
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 32
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
|
After Width: | Height: | Size: 167 B |
@@ -0,0 +1,47 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7fbbedb31432e4d408b2e3fbd0dbd862
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 32
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
|
After Width: | Height: | Size: 168 B |
@@ -0,0 +1,47 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8b5fb4ca0fdd2c4eadc7cbe065543a4
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 32
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 206f513b60f950c4793035333d2f95d5
|
||||
folderAsset: yes
|
||||
timeCreated: 1583523317
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,76 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: DefaultDemo
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 1
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 0
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f663b5cc3e742024b902055797e3957c
|
||||
timeCreated: 1583523326
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e35a0c5b2541b24983f361278c74f91
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
||||
@@ -0,0 +1,111 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &102934
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 402934}
|
||||
- component: {fileID: 3302934}
|
||||
- component: {fileID: 6502934}
|
||||
- component: {fileID: 2302934}
|
||||
- component: {fileID: 5492826}
|
||||
m_Layer: 0
|
||||
m_Name: Cube
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &402934
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 102934}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
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!23 &2302934
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 102934}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 0
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!33 &3302934
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 102934}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!54 &5492826
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 102934}
|
||||
serializedVersion: 2
|
||||
m_Mass: 1
|
||||
m_Drag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 1
|
||||
--- !u!65 &6502934
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 102934}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 102934}
|
||||
m_IsPrefabParent: 1
|
||||
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 08f87e0910df635498ae10bedcb85aab
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2efc957cf89b49b41a927320a690604b
|
||||
folderAsset: yes
|
||||
timeCreated: 1563636592
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 1
|
||||
guid: aac421df044c8404b9bd40c84487a589
|
||||
@@ -0,0 +1,364 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 8
|
||||
m_Fog: 1
|
||||
m_FogColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_FogMode: 1
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 30
|
||||
m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 3
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
--- !u!157 &4
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_TemporalCoherenceThreshold: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 8
|
||||
m_Resolution: 1
|
||||
m_BakeResolution: 50
|
||||
m_TextureWidth: 1024
|
||||
m_TextureHeight: 1024
|
||||
m_AO: 1
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 0
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 1
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringMode: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_ShadowMaskMode: 2
|
||||
--- !u!1 &11
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 18}
|
||||
- component: {fileID: 20}
|
||||
- component: {fileID: 37}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &18
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 11}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||
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 &20
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 11}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.01
|
||||
far clip plane: 300
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 100
|
||||
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: 0
|
||||
m_AllowMSAA: 1
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 0
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
m_StereoMirrorMode: 0
|
||||
--- !u!81 &37
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 11}
|
||||
m_Enabled: 1
|
||||
--- !u!196 &44
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666666
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &1130807521
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1130807525}
|
||||
- component: {fileID: 1130807524}
|
||||
- component: {fileID: 1130807523}
|
||||
- component: {fileID: 1130807522}
|
||||
m_Layer: 0
|
||||
m_Name: TextureCapture
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1130807522
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1130807521}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: de5a7a2f274da2340a2de24a1fffee45, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_encoderHintsWindows:
|
||||
videoHints:
|
||||
averageBitrate: 0
|
||||
maximumBitrate: 0
|
||||
quality: 1
|
||||
keyframeInterval: 0
|
||||
allowFastStartStreamingPostProcess: 1
|
||||
supportTransparency: 0
|
||||
useHardwareEncoding: 1
|
||||
imageHints:
|
||||
quality: 0.85
|
||||
supportTransparency: 0
|
||||
_encoderHintsMacOS:
|
||||
videoHints:
|
||||
averageBitrate: 0
|
||||
maximumBitrate: 0
|
||||
quality: 1
|
||||
keyframeInterval: 0
|
||||
allowFastStartStreamingPostProcess: 1
|
||||
supportTransparency: 0
|
||||
useHardwareEncoding: 1
|
||||
imageHints:
|
||||
quality: 0.85
|
||||
supportTransparency: 0
|
||||
_encoderHintsIOS:
|
||||
videoHints:
|
||||
averageBitrate: 0
|
||||
maximumBitrate: 0
|
||||
quality: 1
|
||||
keyframeInterval: 0
|
||||
allowFastStartStreamingPostProcess: 1
|
||||
supportTransparency: 0
|
||||
useHardwareEncoding: 1
|
||||
imageHints:
|
||||
quality: 0.85
|
||||
supportTransparency: 0
|
||||
_captureKey: 0
|
||||
_isRealTime: 0
|
||||
_persistAcrossSceneLoads: 0
|
||||
_startTrigger: 0
|
||||
_startDelay: 0
|
||||
_startDelaySeconds: 0
|
||||
_stopMode: 0
|
||||
_stopFrames: 0
|
||||
_stopSeconds: 0
|
||||
_videoCodecPriorityWindows:
|
||||
- H264
|
||||
- HEVC
|
||||
- Lagarith Lossless Codec
|
||||
- Uncompressed
|
||||
- x264vfw - H.264/MPEG-4 AVC codec
|
||||
- Xvid MPEG-4 Codec
|
||||
_videoCodecPriorityMacOS:
|
||||
- H264
|
||||
- HEVC
|
||||
- Apple ProRes 422
|
||||
- Apple ProRes 4444
|
||||
_audioCodecPriorityWindows:
|
||||
- AAC
|
||||
- Uncompressed
|
||||
_audioCodecPriorityMacOS:
|
||||
- AAC
|
||||
- FLAC
|
||||
- Apple Lossless
|
||||
- Linear PCM
|
||||
- Uncompresssed
|
||||
_frameRate: 30
|
||||
_timelapseScale: 1
|
||||
_downScale: 1
|
||||
_maxVideoSize: {x: 0, y: 0}
|
||||
_forceVideoCodecIndexWindows: -1
|
||||
_forceVideoCodecIndexMacOS: 0
|
||||
_forceVideoCodecIndexIOS: 0
|
||||
_forceAudioCodecIndexWindows: -1
|
||||
_forceAudioCodecIndexMacOS: 0
|
||||
_forceAudioCodecIndexIOS: 0
|
||||
_flipVertically: 0
|
||||
_forceGpuFlush: 0
|
||||
_useWaitForEndOfFrame: 1
|
||||
_logCaptureStartStop: 1
|
||||
_audioCaptureSource: 1
|
||||
_unityAudioCapture: {fileID: 0}
|
||||
_forceAudioInputDeviceIndex: 0
|
||||
_outputTarget: 0
|
||||
_outputFolderType: 0
|
||||
_outputFolderPath: Captures
|
||||
_filenamePrefix: TextureCapture
|
||||
_appendFilenameTimestamp: 1
|
||||
_allowManualFileExtension: 0
|
||||
_filenameExtension: mp4
|
||||
_namedPipePath: \\.\pipe\test_pipe
|
||||
_imageSequenceStartFrame: 0
|
||||
_imageSequenceZeroDigits: 6
|
||||
_imageSequenceFormatWindows: 0
|
||||
_imageSequenceFormatMacOS: 0
|
||||
_imageSequenceFormatIOS: 0
|
||||
_renderResolution: 14
|
||||
_renderSize: {x: 1, y: 1}
|
||||
_renderAntiAliasing: -1
|
||||
_useMotionBlur: 0
|
||||
_motionBlurSamples: 0
|
||||
_motionBlurCameras: []
|
||||
_motionBlur: {fileID: 0}
|
||||
_allowVSyncDisable: 1
|
||||
_supportTextureRecreate: 0
|
||||
_minimumDiskSpaceMB: -1
|
||||
_manualUpdate: 0
|
||||
--- !u!114 &1130807523
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1130807521}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1f519d13df72fce439c800f34395deb7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_shader: {fileID: 4800000, guid: f3d2361de25fd894da4e336b857ff62d, type: 3}
|
||||
_textureWidth: 1024
|
||||
_textureHeight: 1024
|
||||
_movieCapture: {fileID: 1130807522}
|
||||
--- !u!114 &1130807524
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1130807521}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7ca3e27221be35d41a4ff608f4ef327e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_movieCapture: {fileID: 1130807522}
|
||||
_showUI: 1
|
||||
_whenRecordingAutoHideUI: 0
|
||||
_guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2}
|
||||
--- !u!4 &1130807525
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1130807521}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4c41bfde9dbb0a3449f96fdffb67a8e2
|
||||
@@ -0,0 +1,368 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 8
|
||||
m_Fog: 1
|
||||
m_FogColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_FogMode: 1
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 30
|
||||
m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 3
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
--- !u!157 &4
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_TemporalCoherenceThreshold: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 8
|
||||
m_Resolution: 1
|
||||
m_BakeResolution: 50
|
||||
m_TextureWidth: 1024
|
||||
m_TextureHeight: 1024
|
||||
m_AO: 1
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 0
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 1
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringMode: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_ShadowMaskMode: 2
|
||||
--- !u!1 &11
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 18}
|
||||
- component: {fileID: 20}
|
||||
- component: {fileID: 37}
|
||||
- component: {fileID: 12}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &12
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 11}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 98a052fe19e52c048865e758e854f078, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_skin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2}
|
||||
_prefab: {fileID: 1774798094}
|
||||
_webcamResolutionWidth: 640
|
||||
_webcamResolutionHeight: 480
|
||||
_webcamFrameRate: 30
|
||||
--- !u!4 &18
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 11}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||
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 &20
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 11}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 0.08088237, g: 0.08088237, b: 0.08088237, a: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.01
|
||||
far clip plane: 300
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 100
|
||||
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: 0
|
||||
m_AllowMSAA: 1
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 0
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
m_StereoMirrorMode: 0
|
||||
--- !u!81 &37
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 11}
|
||||
m_Enabled: 1
|
||||
--- !u!196 &44
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666666
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &1774798094
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1774798102}
|
||||
- component: {fileID: 1774798097}
|
||||
- component: {fileID: 1774798095}
|
||||
m_Layer: 0
|
||||
m_Name: WebcamCapturePrefab
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1774798095
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1774798094}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ea41b0330d3eea243b45fd4355c3080c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_encoderHintsWindows:
|
||||
videoHints:
|
||||
averageBitrate: 0
|
||||
maximumBitrate: 0
|
||||
quality: 1
|
||||
keyframeInterval: 0
|
||||
allowFastStartStreamingPostProcess: 1
|
||||
supportTransparency: 0
|
||||
useHardwareEncoding: 1
|
||||
imageHints:
|
||||
quality: 0.85
|
||||
supportTransparency: 0
|
||||
_encoderHintsMacOS:
|
||||
videoHints:
|
||||
averageBitrate: 0
|
||||
maximumBitrate: 0
|
||||
quality: 1
|
||||
keyframeInterval: 0
|
||||
allowFastStartStreamingPostProcess: 1
|
||||
supportTransparency: 0
|
||||
useHardwareEncoding: 1
|
||||
imageHints:
|
||||
quality: 0.85
|
||||
supportTransparency: 0
|
||||
_encoderHintsIOS:
|
||||
videoHints:
|
||||
averageBitrate: 0
|
||||
maximumBitrate: 0
|
||||
quality: 1
|
||||
keyframeInterval: 0
|
||||
allowFastStartStreamingPostProcess: 1
|
||||
supportTransparency: 0
|
||||
useHardwareEncoding: 1
|
||||
imageHints:
|
||||
quality: 0.85
|
||||
supportTransparency: 0
|
||||
_captureKey: 0
|
||||
_isRealTime: 1
|
||||
_persistAcrossSceneLoads: 0
|
||||
_startTrigger: 0
|
||||
_startDelay: 0
|
||||
_startDelaySeconds: 0
|
||||
_stopMode: 0
|
||||
_stopFrames: 0
|
||||
_stopSeconds: 0
|
||||
_videoCodecPriorityWindows:
|
||||
- H264
|
||||
- HEVC
|
||||
- Lagarith Lossless Codec
|
||||
- Uncompressed
|
||||
- x264vfw - H.264/MPEG-4 AVC codec
|
||||
- Xvid MPEG-4 Codec
|
||||
_videoCodecPriorityMacOS:
|
||||
- H264
|
||||
- HEVC
|
||||
- Apple ProRes 422
|
||||
- Apple ProRes 4444
|
||||
_audioCodecPriorityWindows:
|
||||
- AAC
|
||||
- Uncompressed
|
||||
_audioCodecPriorityMacOS:
|
||||
- AAC
|
||||
- FLAC
|
||||
- Apple Lossless
|
||||
- Linear PCM
|
||||
- Uncompresssed
|
||||
_frameRate: 30
|
||||
_timelapseScale: 1
|
||||
_frameUpdateMode: 0
|
||||
_downScale: 1
|
||||
_maxVideoSize: {x: 0, y: 0}
|
||||
_forceVideoCodecIndexWindows: -1
|
||||
_forceVideoCodecIndexMacOS: 0
|
||||
_forceVideoCodecIndexIOS: 0
|
||||
_forceAudioCodecIndexWindows: -1
|
||||
_forceAudioCodecIndexMacOS: 0
|
||||
_forceAudioCodecIndexIOS: 0
|
||||
_flipVertically: 0
|
||||
_forceGpuFlush: 0
|
||||
_useWaitForEndOfFrame: 1
|
||||
_logCaptureStartStop: 1
|
||||
_audioCaptureSource: 0
|
||||
_unityAudioCapture: {fileID: 0}
|
||||
_forceAudioInputDeviceIndex: 0
|
||||
_manualAudioSampleRate: 48000
|
||||
_manualAudioChannelCount: 2
|
||||
_outputTarget: 0
|
||||
_outputFolderType: 0
|
||||
_outputFolderPath: Captures
|
||||
_filenamePrefix: Webcam
|
||||
_appendFilenameTimestamp: 1
|
||||
_allowManualFileExtension: 0
|
||||
_filenameExtension: mp4
|
||||
_namedPipePath: \\.\pipe\test_pipe
|
||||
_imageSequenceStartFrame: 0
|
||||
_imageSequenceZeroDigits: 6
|
||||
_imageSequenceFormatWindows: 0
|
||||
_imageSequenceFormatMacOS: 0
|
||||
_imageSequenceFormatIOS: 0
|
||||
_renderResolution: 18
|
||||
_renderSize: {x: 1, y: 1}
|
||||
_renderAntiAliasing: -1
|
||||
_useMotionBlur: 0
|
||||
_motionBlurSamples: 16
|
||||
_motionBlurCameras: []
|
||||
_motionBlur: {fileID: 0}
|
||||
_allowVSyncDisable: 1
|
||||
_supportTextureRecreate: 0
|
||||
_minimumDiskSpaceMB: -1
|
||||
_manualUpdate: 0
|
||||
--- !u!114 &1774798097
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1774798094}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7ca3e27221be35d41a4ff608f4ef327e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_movieCapture: {fileID: 1774798095}
|
||||
_showUI: 0
|
||||
_whenRecordingAutoHideUI: 0
|
||||
_guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2}
|
||||
--- !u!4 &1774798102
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1774798094}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ba0f3c85855c684db1ca2bfaa26058a
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 092608d1cce5b7a4c961385358838689
|
||||
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12b616342e078604a85b24def8314313
|
||||
DefaultImporter:
|
||||
userData:
|
||||
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a59b6804fb7f20947abe5bbece9bb4f1
|
||||
DefaultImporter:
|
||||
userData:
|
||||
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9796adb67791004f8de331385c2ebe5
|
||||
DefaultImporter:
|
||||
userData:
|
||||
@@ -0,0 +1,798 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 8
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_TemporalCoherenceThreshold: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 8
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_TextureWidth: 1024
|
||||
m_TextureHeight: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 3
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_ShadowMaskMode: 2
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &177080796
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 177080798}
|
||||
- component: {fileID: 177080797}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &177080797
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 177080796}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 4
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &177080798
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 177080796}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &648885771
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 648885772}
|
||||
- component: {fileID: 648885775}
|
||||
- component: {fileID: 648885774}
|
||||
- component: {fileID: 648885773}
|
||||
m_Layer: 0
|
||||
m_Name: Capsule
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &648885772
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 648885771}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 791625166}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &648885773
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 648885771}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 1
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!136 &648885774
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 648885771}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
m_Radius: 0.5
|
||||
m_Height: 2
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &648885775
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 648885771}
|
||||
m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &791625161
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 791625166}
|
||||
- component: {fileID: 791625165}
|
||||
- component: {fileID: 791625162}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &791625162
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 791625161}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &791625165
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 791625161}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.1
|
||||
far clip plane: 100
|
||||
field of view: 60
|
||||
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: 0
|
||||
m_AllowMSAA: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 0
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
m_StereoMirrorMode: 0
|
||||
--- !u!4 &791625166
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 791625161}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 648885772}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &935719015
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 935719017}
|
||||
- component: {fileID: 935719016}
|
||||
m_Layer: 0
|
||||
m_Name: Demo
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &935719016
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 935719015}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d8148657fef7dab4e8414216aaa44cf8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_audioObjects:
|
||||
- {fileID: 1884010177}
|
||||
_audioSources: []
|
||||
--- !u!4 &935719017
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 935719015}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &993218520
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 993218522}
|
||||
- component: {fileID: 993218521}
|
||||
m_Layer: 0
|
||||
m_Name: Camera-PIP
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!20 &993218521
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 993218520}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 0.2
|
||||
height: 0.2
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: 5
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 0
|
||||
m_AllowMSAA: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 0
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
m_StereoMirrorMode: 0
|
||||
--- !u!4 &993218522
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 993218520}
|
||||
m_LocalRotation: {x: 0.1993598, y: -0, z: -0, w: 0.9799264}
|
||||
m_LocalPosition: {x: 0, y: 1.28, z: -2.92}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 22.999, y: 0, z: 0}
|
||||
--- !u!1 &1140585883
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1140585885}
|
||||
- component: {fileID: 1140585884}
|
||||
- component: {fileID: 1140585887}
|
||||
- component: {fileID: 1140585886}
|
||||
m_Layer: 0
|
||||
m_Name: Capture
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1140585884
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1140585883}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2f452da2383e6e24991a212542347f4b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_encoderHintsWindows:
|
||||
videoHints:
|
||||
averageBitrate: 0
|
||||
maximumBitrate: 0
|
||||
quality: 1
|
||||
keyframeInterval: 0
|
||||
allowFastStartStreamingPostProcess: 0
|
||||
supportTransparency: 0
|
||||
useHardwareEncoding: 1
|
||||
imageHints:
|
||||
quality: 0.85
|
||||
supportTransparency: 0
|
||||
_encoderHintsMacOS:
|
||||
videoHints:
|
||||
averageBitrate: 0
|
||||
maximumBitrate: 0
|
||||
quality: 1
|
||||
keyframeInterval: 0
|
||||
allowFastStartStreamingPostProcess: 1
|
||||
supportTransparency: 0
|
||||
useHardwareEncoding: 1
|
||||
imageHints:
|
||||
quality: 0.85
|
||||
supportTransparency: 0
|
||||
_encoderHintsIOS:
|
||||
videoHints:
|
||||
averageBitrate: 0
|
||||
maximumBitrate: 0
|
||||
quality: 1
|
||||
keyframeInterval: 0
|
||||
allowFastStartStreamingPostProcess: 1
|
||||
supportTransparency: 0
|
||||
useHardwareEncoding: 1
|
||||
imageHints:
|
||||
quality: 0.85
|
||||
supportTransparency: 0
|
||||
_captureKey: 0
|
||||
_isRealTime: 1
|
||||
_persistAcrossSceneLoads: 0
|
||||
_startTrigger: 1
|
||||
_startDelay: 0
|
||||
_startDelaySeconds: 0
|
||||
_stopMode: 3
|
||||
_stopFrames: 0
|
||||
_stopSeconds: 12
|
||||
_videoCodecPriorityWindows:
|
||||
- HEVC
|
||||
- H264
|
||||
- Lagarith Lossless Codec
|
||||
- Uncompressed
|
||||
- x264vfw - H.264/MPEG-4 AVC codec
|
||||
- Xvid MPEG-4 Codec
|
||||
_videoCodecPriorityMacOS:
|
||||
- H264
|
||||
- HEVC
|
||||
- Apple ProRes 422
|
||||
- Apple ProRes 4444
|
||||
_audioCodecPriorityWindows:
|
||||
- AAC
|
||||
- Uncompressed
|
||||
_audioCodecPriorityMacOS:
|
||||
- AAC
|
||||
- FLAC
|
||||
- Apple Lossless
|
||||
- Linear PCM
|
||||
- Uncompresssed
|
||||
_frameRate: 30
|
||||
_timelapseScale: 1
|
||||
_frameUpdateMode: 0
|
||||
_downScale: 1
|
||||
_maxVideoSize: {x: 0, y: 0}
|
||||
_forceVideoCodecIndexWindows: -1
|
||||
_forceVideoCodecIndexMacOS: 0
|
||||
_forceVideoCodecIndexIOS: 0
|
||||
_forceAudioCodecIndexWindows: -1
|
||||
_forceAudioCodecIndexMacOS: 0
|
||||
_forceAudioCodecIndexIOS: 0
|
||||
_flipVertically: 0
|
||||
_forceGpuFlush: 0
|
||||
_useWaitForEndOfFrame: 1
|
||||
_logCaptureStartStop: 1
|
||||
_audioCaptureSource: 0
|
||||
_unityAudioCapture: {fileID: 0}
|
||||
_forceAudioInputDeviceIndex: 0
|
||||
_manualAudioSampleRate: 48000
|
||||
_manualAudioChannelCount: 4
|
||||
_outputTarget: 0
|
||||
_outputFolderType: 0
|
||||
_outputFolderPath: Captures
|
||||
_filenamePrefix: proxy360
|
||||
_appendFilenameTimestamp: 0
|
||||
_allowManualFileExtension: 0
|
||||
_filenameExtension: mp4
|
||||
_namedPipePath: \\.\pipe\test_pipe
|
||||
_imageSequenceStartFrame: 0
|
||||
_imageSequenceZeroDigits: 6
|
||||
_imageSequenceFormatWindows: 0
|
||||
_imageSequenceFormatMacOS: 0
|
||||
_imageSequenceFormatIOS: 0
|
||||
_renderResolution: 15
|
||||
_renderSize: {x: 1, y: 1}
|
||||
_renderAntiAliasing: -1
|
||||
_useMotionBlur: 0
|
||||
_motionBlurSamples: 16
|
||||
_motionBlurCameras: []
|
||||
_motionBlur: {fileID: 0}
|
||||
_allowVSyncDisable: 1
|
||||
_supportTextureRecreate: 0
|
||||
_minimumDiskSpaceMB: -1
|
||||
_cameraSelector: {fileID: 0}
|
||||
_cubemapResolution: 256
|
||||
_cubemapDepth: 24
|
||||
_supportGUI: 0
|
||||
_supportCameraRotation: 0
|
||||
_onlyLeftRightRotation: 0
|
||||
_render180Degrees: 0
|
||||
_stereoRendering: 0
|
||||
_ipd: 0.064
|
||||
_camera: {fileID: 791625165}
|
||||
--- !u!4 &1140585885
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1140585883}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -1.243124, y: -0.125, z: 0.70754045}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1140585886
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1140585883}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d496180929275434c90b945a345cbaa2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_capture: {fileID: 1140585884}
|
||||
_order: 3
|
||||
_format: 1
|
||||
_filename: output.wav
|
||||
_bufferCount: 16
|
||||
--- !u!114 &1140585887
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1140585883}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7ca3e27221be35d41a4ff608f4ef327e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_movieCapture: {fileID: 1140585884}
|
||||
_showUI: 1
|
||||
_whenRecordingAutoHideUI: 0
|
||||
_guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2}
|
||||
--- !u!1 &1884010172
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1884010177}
|
||||
- component: {fileID: 1884010176}
|
||||
- component: {fileID: 1884010175}
|
||||
- component: {fileID: 1884010174}
|
||||
- component: {fileID: 1884010173}
|
||||
m_Layer: 0
|
||||
m_Name: AudioObject-Insect1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!33 &1884010173
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1884010172}
|
||||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &1884010174
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1884010172}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!114 &1884010175
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1884010172}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7fb5927f10eb767468d3bb55a913ed3b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_sink: {fileID: 1140585886}
|
||||
_listener: {fileID: 791625166}
|
||||
--- !u!82 &1884010176
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1884010172}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 8300000, guid: 764908f8332f02340b72e3010f4a3a2e, type: 3}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 0.398
|
||||
m_Pitch: 1
|
||||
Loop: 1
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 2
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 0
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 0
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 0
|
||||
--- !u!4 &1884010177
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1884010172}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 2}
|
||||
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53aebdd36b29c09468b985f749fa0d2f
|
||||
timeCreated: 1606666929
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2693fb63d67b5cd4ba2b8e89fe16bcd1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
||||
@@ -0,0 +1,79 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright 2012-2022 RenderHeads Ltd. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace RenderHeads.Media.AVProMovieCapture.Demos
|
||||
{
|
||||
public class AmbisonicAudioDemo : MonoBehaviour
|
||||
{
|
||||
[SerializeField] Transform[] _audioObjects = null;
|
||||
[SerializeField] AudioSource[] _audioSources = null;
|
||||
|
||||
struct Instance
|
||||
{
|
||||
float x, y, z;
|
||||
float radius;
|
||||
}
|
||||
|
||||
private int index;
|
||||
//private List<Instance> _instances = new List<Instance>(4);
|
||||
|
||||
/*void Start()
|
||||
{
|
||||
foreach (Transform t in _audioObjects)
|
||||
{
|
||||
Instance instance = new Instance();
|
||||
instance.radius = Random.Range(0.5f, 2f);
|
||||
instance.x = Random.Range(0f, 100f);
|
||||
instance.y = Random.Range(0f, 100f);
|
||||
instance.z = Random.Range(0f, 100f);
|
||||
_instances.Add(instance);
|
||||
}
|
||||
}*/
|
||||
|
||||
void Update()
|
||||
{
|
||||
float[] samples = new float[4];
|
||||
foreach (AudioSource audio in _audioSources)
|
||||
{
|
||||
audio.GetOutputData(samples, 0);
|
||||
float sample = Mathf.Abs(samples[2]);
|
||||
sample = Mathf.Sqrt(sample);
|
||||
float scale = audio.gameObject.transform.localScale.x;
|
||||
//audio.GetSpectrumData(samples, 0, FFTWindow.Hanning);
|
||||
|
||||
scale = 0.15f + Mathf.Lerp(scale, sample, Time.deltaTime * 20f) * 0.85f;
|
||||
audio.gameObject.transform.localScale = Vector3.one * scale;
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
foreach (Transform t in _audioObjects)
|
||||
{
|
||||
//Vector3 v = axes[index % axes.Length];
|
||||
//t.RotateAround(Vector3.zero, Vector3.up, 40 * Time.deltaTime);
|
||||
//Quaternion q = Quaternion.Euler(0f, Time.timeSinceLevelLoad * 50f, 0f);
|
||||
//Matrix4x4.TRS(Vector3)
|
||||
|
||||
float time = Time.timeSinceLevelLoad + index * 1.321f;
|
||||
float tt = Mathf.PingPong(Mathf.Sin(time * 2.23f) + 1f, 2f) / 2f;
|
||||
float r = Mathf.Lerp(0.5f, 3f, tt);
|
||||
float x = Mathf.Sin(time * 1f) * r;
|
||||
float z = Mathf.Cos(time * 1.13f) * r;
|
||||
float y = Mathf.Sin(time * 1.23f) * 1f;
|
||||
|
||||
|
||||
//Vector3 v = t.position.normalized * r;
|
||||
|
||||
t.position = new Vector3(x, y, z);
|
||||
|
||||
//t.position = new Vector3(t.position.x, y, t.position.z);
|
||||
index++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8148657fef7dab4e8414216aaa44cf8
|
||||
timeCreated: 1606667340
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,228 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright 2012-2022 RenderHeads Ltd. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace RenderHeads.Media.AVProMovieCapture.Demos
|
||||
{
|
||||
public class ScreenCaptureDemo : MonoBehaviour
|
||||
{
|
||||
[SerializeField] AudioClip _audioBG = null;
|
||||
[SerializeField] AudioClip _audioHit = null;
|
||||
[SerializeField] float _speed = 1.0f;
|
||||
[SerializeField] CaptureBase _capture = null;
|
||||
[SerializeField] GUISkin _guiSkin = null;
|
||||
[SerializeField] bool _spinCamera = true;
|
||||
|
||||
// State
|
||||
private float _timer;
|
||||
private List<FileWritingHandler> _fileWritingHandlers = new List<FileWritingHandler>(4);
|
||||
|
||||
private IEnumerator Start()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
Application.targetFrameRate = 60;
|
||||
#endif
|
||||
// Play music track
|
||||
if (_audioBG != null)
|
||||
{
|
||||
// AudioSource.PlayClipAtPoint(_audioBG, Vector3.zero);
|
||||
AudioSource source = gameObject.AddComponent<AudioSource>();
|
||||
source.clip = _audioBG;
|
||||
source.loop = true;
|
||||
source.Play();
|
||||
}
|
||||
if (_capture != null)
|
||||
{
|
||||
_capture.BeginFinalFileWritingAction += OnBeginFinalFileWriting;
|
||||
_capture.CompletedFileWritingAction += OnCompleteFinalFileWriting;
|
||||
|
||||
#if (UNITY_STANDALONE_OSX || UNITY_IOS || UNITY_ANDROID) && !UNITY_EDITOR
|
||||
CaptureBase.PhotoLibraryAccessLevel photoLibraryAccessLevel = CaptureBase.PhotoLibraryAccessLevel.AddOnly;
|
||||
|
||||
// If we're trying to write to the photo library, make sure we have permission
|
||||
if (_capture.OutputFolder == CaptureBase.OutputPath.PhotoLibrary ||
|
||||
_capture.OutputFolder == CaptureBase.OutputPath.RelativeToVideos ||
|
||||
_capture.OutputFolder == CaptureBase.OutputPath.RelativeToPictures)
|
||||
{
|
||||
// Album creation (album name is taken from the output folder path) requires read write access.
|
||||
if (_capture.OutputFolderPath != null && _capture.OutputFolderPath.Length > 0)
|
||||
photoLibraryAccessLevel = CaptureBase.PhotoLibraryAccessLevel.ReadWrite;
|
||||
|
||||
switch (CaptureBase.HasUserAuthorisationToAccessPhotos(photoLibraryAccessLevel))
|
||||
{
|
||||
case CaptureBase.PhotoLibraryAuthorisationStatus.Authorised:
|
||||
// All good, nothing to do
|
||||
break;
|
||||
|
||||
case CaptureBase.PhotoLibraryAuthorisationStatus.Unavailable:
|
||||
Debug.LogWarning("The photo library is unavailable, will use RelativeToPersistentData instead");
|
||||
_capture.OutputFolder = CaptureBase.OutputPath.RelativeToPersistentData;
|
||||
break;
|
||||
|
||||
case CaptureBase.PhotoLibraryAuthorisationStatus.Denied:
|
||||
// User has denied access, change output path
|
||||
Debug.LogWarning("User has denied access to the photo library, will use RelativeToPersistentData instead");
|
||||
_capture.OutputFolder = CaptureBase.OutputPath.RelativeToPersistentData;
|
||||
break;
|
||||
|
||||
case CaptureBase.PhotoLibraryAuthorisationStatus.NotDetermined:
|
||||
// Need to ask permission
|
||||
yield return CaptureBase.RequestUserAuthorisationToAccessPhotos(photoLibraryAccessLevel);
|
||||
// Nested switch, everbodies favourite
|
||||
switch (CaptureBase.HasUserAuthorisationToAccessPhotos(photoLibraryAccessLevel))
|
||||
{
|
||||
case CaptureBase.PhotoLibraryAuthorisationStatus.Authorised:
|
||||
// All good, nothing to do
|
||||
break;
|
||||
|
||||
case CaptureBase.PhotoLibraryAuthorisationStatus.Denied:
|
||||
// User has denied access, change output path
|
||||
Debug.LogWarning("User has denied access to the photo library, will use RelativeToPersistentData instead");
|
||||
_capture.OutputFolder = CaptureBase.OutputPath.RelativeToPersistentData;
|
||||
break;
|
||||
|
||||
case CaptureBase.PhotoLibraryAuthorisationStatus.NotDetermined:
|
||||
// We were unable to request access for some reason, check the logs for any error information
|
||||
Debug.LogWarning("Authorisation to access the photo library is still undetermined, will use RelativeToPersistentData instead");
|
||||
_capture.OutputFolder = CaptureBase.OutputPath.RelativeToPersistentData;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if UNITY_EDITOR_OSX || (!UNITY_EDITOR && (UNITY_STANDALONE_OSX || UNITY_IOS || UNITY_ANDROID))
|
||||
// Make sure we're authorised for using the microphone. On iOS the OS will forcibly
|
||||
// close the application if authorisation has not been granted. Make sure the
|
||||
// "Microphone Usage Description" field has been filled in the player settings.
|
||||
// Todo: handle late selection of microphone
|
||||
if (_capture.AudioCaptureSource == AudioCaptureSource.Microphone)
|
||||
{
|
||||
NativePlugin.MicrophoneRecordingOptions options = NativePlugin.MicrophoneRecordingOptions.None;
|
||||
|
||||
Debug.Log("Checking user has authorization to use the Microphone");
|
||||
switch (CaptureBase.HasUserAuthorisationToCaptureAudio())
|
||||
{
|
||||
case CaptureBase.AudioCaptureDeviceAuthorisationStatus.Unavailable:
|
||||
Debug.LogWarning("Audio capture is unavailable, no audio will be captured");
|
||||
break;
|
||||
|
||||
case CaptureBase.AudioCaptureDeviceAuthorisationStatus.NotDetermined:
|
||||
Debug.Log("Audio capture status is not determined, requesting access");
|
||||
yield return CaptureBase.RequestAudioCaptureDeviceUserAuthorisation();
|
||||
switch (CaptureBase.HasUserAuthorisationToCaptureAudio())
|
||||
{
|
||||
case CaptureBase.AudioCaptureDeviceAuthorisationStatus.Unavailable:
|
||||
Debug.LogWarning("Audio capture is unavailable, no audio will be captured");
|
||||
break;
|
||||
|
||||
case CaptureBase.AudioCaptureDeviceAuthorisationStatus.NotDetermined:
|
||||
Debug.LogWarning("Audio capture status is still not determined, no audio will be captured");
|
||||
break;
|
||||
|
||||
case CaptureBase.AudioCaptureDeviceAuthorisationStatus.Denied:
|
||||
Debug.LogWarning("Audio capture status denied, no audio will be captured");
|
||||
break;
|
||||
|
||||
case CaptureBase.AudioCaptureDeviceAuthorisationStatus.Authorised:
|
||||
Debug.Log("Audio capture is authorised");
|
||||
NativePlugin.SetMicrophoneRecordingHint(true, options);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case CaptureBase.AudioCaptureDeviceAuthorisationStatus.Denied:
|
||||
Debug.LogWarning("Audio capture status denied, no audio will be captured");
|
||||
break;
|
||||
|
||||
case CaptureBase.AudioCaptureDeviceAuthorisationStatus.Authorised:
|
||||
Debug.Log("Audio capture is authorised");
|
||||
NativePlugin.SetMicrophoneRecordingHint(true, options);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
yield return null;
|
||||
}
|
||||
|
||||
private void OnBeginFinalFileWriting(FileWritingHandler handler)
|
||||
{
|
||||
_fileWritingHandlers.Add(handler);
|
||||
}
|
||||
|
||||
private void OnCompleteFinalFileWriting(FileWritingHandler handler)
|
||||
{
|
||||
Debug.Log("Completed capture '" + handler.Path + "' with status: " + handler.Status.ToString());
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
#if (!ENABLE_INPUT_SYSTEM || ENABLE_LEGACY_INPUT_MANAGER)
|
||||
// Press the S key to trigger audio and background color change - useful for testing A/V sync
|
||||
#if (UNITY_IOS || UNITY_ANDROID) && !UNITY_EDITOR
|
||||
bool bTouch = (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Ended);
|
||||
if (bTouch)
|
||||
#else
|
||||
if (Input.GetKeyDown(KeyCode.S))
|
||||
#endif
|
||||
{
|
||||
if (_audioHit != null && _capture != null && _capture.IsCapturing())
|
||||
{
|
||||
AudioSource.PlayClipAtPoint(_audioHit, Vector3.zero);
|
||||
Camera.main.backgroundColor = new Color(Random.value, Random.value, Random.value, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// ESC to stop capture and quit
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
if (_capture != null && _capture.IsCapturing())
|
||||
{
|
||||
_capture.StopCapture();
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Spin the camera around
|
||||
if (_spinCamera && Camera.main != null)
|
||||
{
|
||||
Camera.main.transform.RotateAround(Vector3.zero, Vector3.up, 20f * Time.deltaTime * _speed);
|
||||
}
|
||||
|
||||
if (FileWritingHandler.Cleanup(_fileWritingHandlers))
|
||||
{
|
||||
if (_fileWritingHandlers.Count == 0)
|
||||
{
|
||||
Debug.Log("All pending file writes completed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
foreach (FileWritingHandler handler in _fileWritingHandlers)
|
||||
{
|
||||
handler.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
GUI.skin = _guiSkin;
|
||||
Rect r = new Rect(Screen.width - 108, 64, 128, 28);
|
||||
GUI.Label(r, "Frame " + Time.frameCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ba7f85d458d9d041a1180c7018b9d00
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: -100
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
@@ -0,0 +1,100 @@
|
||||
using UnityEngine;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright 2012-2022 RenderHeads Ltd. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace RenderHeads.Media.AVProMovieCapture.Demos
|
||||
{
|
||||
/// <summary>
|
||||
/// Demo code to create and write frames manually into a movie using the low-level API via scripting
|
||||
/// </summary>
|
||||
public class ScriptCaptureDemo : MonoBehaviour
|
||||
{
|
||||
private const string X264CodecName = "x264vfw - H.264/MPEG-4 AVC codec";
|
||||
private const string FallbackCodecName = "Uncompressed";
|
||||
|
||||
/*[SerializeField]
|
||||
private int _width = 512;
|
||||
|
||||
[SerializeField]
|
||||
private int _height = 512;
|
||||
|
||||
[SerializeField]
|
||||
private int _frameRate = 30;
|
||||
|
||||
[SerializeField]
|
||||
private string _filePath;*/
|
||||
|
||||
// State
|
||||
private Codec _videoCodec;
|
||||
private int _encoderHandle;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (NativePlugin.Init())
|
||||
{
|
||||
// Find the index for the video codec
|
||||
_videoCodec = CodecManager.FindCodec(CodecType.Video, X264CodecName);
|
||||
if (_videoCodec == null)
|
||||
{
|
||||
_videoCodec = CodecManager.FindCodec(CodecType.Video, FallbackCodecName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
NativePlugin.Deinit();
|
||||
}
|
||||
|
||||
public void CreateVideoFromByteArray(string filePath, int width, int height, int frameRate)
|
||||
{
|
||||
byte[] frameData = new byte[width * height * 4];
|
||||
GCHandle frameHandle = GCHandle.Alloc(frameData, GCHandleType.Pinned);
|
||||
|
||||
// Start the recording session
|
||||
int encoderHandle = NativePlugin.CreateRecorderVideo(filePath, (uint)width, (uint)height, frameRate, (int)NativePlugin.PixelFormat.RGBA32, false, false, _videoCodec.Index, AudioCaptureSource.None, 0, 0, -1, -1, true, null);
|
||||
if (encoderHandle >= 0)
|
||||
{
|
||||
NativePlugin.Start(encoderHandle);
|
||||
|
||||
// Write out 100 frames
|
||||
int numFrames = 100;
|
||||
for (int i = 0; i < numFrames; i++)
|
||||
{
|
||||
// TODO: fill the byte array with your own data :)
|
||||
|
||||
|
||||
// Wait for the encoder to be ready for the next frame
|
||||
int numAttempts = 32;
|
||||
while (numAttempts > 0)
|
||||
{
|
||||
if (NativePlugin.IsNewFrameDue(encoderHandle))
|
||||
{
|
||||
// Encode the new frame
|
||||
NativePlugin.EncodeFrame(encoderHandle, frameHandle.AddrOfPinnedObject());
|
||||
break;
|
||||
}
|
||||
System.Threading.Thread.Sleep(1);
|
||||
numAttempts--;
|
||||
}
|
||||
}
|
||||
|
||||
// End the session
|
||||
NativePlugin.Stop(encoderHandle, false);
|
||||
NativePlugin.FreeRecorder(encoderHandle);
|
||||
}
|
||||
|
||||
if (frameHandle.IsAllocated)
|
||||
{
|
||||
frameHandle.Free();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ebfd325dceeb4842b31e562ca753497
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
@@ -0,0 +1,81 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright 2012-2022 RenderHeads Ltd. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace RenderHeads.Media.AVProMovieCapture.Demos
|
||||
{
|
||||
/// <summary>
|
||||
/// Spawns cube prefabs from a transform and removes them once they reach a maximum number
|
||||
/// </summary>
|
||||
public class SurroundCaptureDemo : MonoBehaviour
|
||||
{
|
||||
[SerializeField] Transform _spawnPoint = null;
|
||||
[SerializeField] GameObject _cubePrefab = null;
|
||||
[SerializeField] bool _spawn = true;
|
||||
|
||||
private const int MaxCubes = 48;
|
||||
private const float SpawnTime = 0.25f;
|
||||
|
||||
// State
|
||||
private float _timer = SpawnTime;
|
||||
private List<GameObject> _cubes = new List<GameObject>(32);
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// Spawn cubes at a certain rate
|
||||
_timer -= Time.deltaTime;
|
||||
if (_timer <= 0f)
|
||||
{
|
||||
if (_spawn)
|
||||
{
|
||||
_timer = SpawnTime;
|
||||
SpawnCube();
|
||||
}
|
||||
|
||||
// Remove cubes when there are too many
|
||||
if (_cubes.Count > MaxCubes || !_spawn)
|
||||
{
|
||||
RemoveCube();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SpawnCube()
|
||||
{
|
||||
Quaternion rotation = Quaternion.Euler(Random.Range(-180f, 180f), Random.Range(-180f, 180f), Random.Range(-180f, 180f));
|
||||
float scale = Random.Range(0.1f, 0.6f);
|
||||
|
||||
GameObject go = (GameObject)GameObject.Instantiate(_cubePrefab, _spawnPoint.position, rotation);
|
||||
Transform t = go.GetComponent<Transform>();
|
||||
go.GetComponent<Rigidbody>().AddExplosionForce(10f, _spawnPoint.position, 5f, 0f, ForceMode.Impulse);
|
||||
|
||||
//AddExplosionForce(float explosionForce, Vector3 explosionPosition, float explosionRadius, float upwardsModifier = 0.0F, ForceMode mode = ForceMode.Force);
|
||||
t.localScale = new Vector3(scale * 2f, scale, scale * 2f);
|
||||
t.SetParent(_spawnPoint);
|
||||
_cubes.Add(go);
|
||||
}
|
||||
|
||||
private void RemoveCube()
|
||||
{
|
||||
if (_cubes.Count > 0)
|
||||
{
|
||||
// Remove the oldest cube
|
||||
GameObject go = _cubes[0];
|
||||
|
||||
// Disabling the collider makes it fall through the floor - which is a neat way to hide its removal
|
||||
go.GetComponent<Collider>().enabled = false;
|
||||
_cubes.RemoveAt(0);
|
||||
StartCoroutine("KillCube", go);
|
||||
}
|
||||
}
|
||||
|
||||
private System.Collections.IEnumerator KillCube(GameObject go)
|
||||
{
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
Destroy(go);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 414b748b3f9089641bbcd64644cba905
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
@@ -0,0 +1,71 @@
|
||||
using UnityEngine;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright 2012-2022 RenderHeads Ltd. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace RenderHeads.Media.AVProMovieCapture.Demos
|
||||
{
|
||||
/// <summary>
|
||||
/// Animates a procedural texture effect driven by a shader
|
||||
/// </summary>
|
||||
public class TextureCaptureDemo : MonoBehaviour
|
||||
{
|
||||
[SerializeField] Shader _shader = null;
|
||||
[SerializeField] int _textureWidth = 1024;
|
||||
[SerializeField] int _textureHeight = 1024;
|
||||
[SerializeField] CaptureFromTexture _movieCapture = null;
|
||||
|
||||
// State
|
||||
private Material _material;
|
||||
private RenderTexture _texture;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_material = new Material(_shader);
|
||||
|
||||
RenderTextureReadWrite readWrite = QualitySettings.activeColorSpace == ColorSpace.Gamma ? RenderTextureReadWrite.Linear : RenderTextureReadWrite.sRGB;
|
||||
_texture = new RenderTexture(_textureWidth, _textureHeight, 0, RenderTextureFormat.ARGB32, readWrite);
|
||||
_texture.filterMode = FilterMode.Bilinear;
|
||||
_texture.Create();
|
||||
|
||||
if (_movieCapture)
|
||||
{
|
||||
_movieCapture.SetSourceTexture(_texture);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (_material != null)
|
||||
{
|
||||
Material.Destroy(_material);
|
||||
_material = null;
|
||||
}
|
||||
if (_texture != null)
|
||||
{
|
||||
RenderTexture.Destroy(_texture);
|
||||
_texture = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
UpdateTexture();
|
||||
}
|
||||
|
||||
private void UpdateTexture()
|
||||
{
|
||||
Graphics.Blit(Texture2D.whiteTexture, _texture, _material);
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (_texture != null)
|
||||
{
|
||||
GUI.depth = 100;
|
||||
GUI.DrawTexture(new Rect(0f, 0f, Screen.width, Screen.height), _texture, ScaleMode.ScaleToFit, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f519d13df72fce439c800f34395deb7
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: -50
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
@@ -0,0 +1,251 @@
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright 2012-2022 RenderHeads Ltd. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace RenderHeads.Media.AVProMovieCapture.Demos
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows the user to select from a list of webcams and creates a capture instance for the webcam recording.
|
||||
/// Currently only a single webcam can be captured at once.
|
||||
/// </summary>
|
||||
public class WebcamCaptureDemo : MonoBehaviour
|
||||
{
|
||||
#pragma warning disable 0414 // x is assigned but its value is never used
|
||||
[SerializeField] GUISkin _skin = null;
|
||||
[SerializeField] GameObject _prefab = null;
|
||||
[SerializeField] int _webcamResolutionWidth = 640;
|
||||
[SerializeField] int _webcamResolutionHeight = 480;
|
||||
[SerializeField] int _webcamFrameRate = 30;
|
||||
#pragma warning restore 0414
|
||||
|
||||
#if AVPRO_MOVIECAPTURE_WEBCAMTEXTURE_SUPPORT
|
||||
|
||||
private class Instance
|
||||
{
|
||||
public string name;
|
||||
public WebCamTexture texture;
|
||||
public CaptureFromWebCamTexture capture;
|
||||
public CaptureGUI gui;
|
||||
}
|
||||
|
||||
// State
|
||||
private Instance[] _instances;
|
||||
private int _selectedWebcamIndex = -1;
|
||||
|
||||
private IEnumerator Start()
|
||||
{
|
||||
Application.targetFrameRate = 60;
|
||||
|
||||
// Make sure we're authorised for using the camera. On iOS the OS will forcibly
|
||||
// close the application if authorisation has not been granted. Make sure the
|
||||
// "Camera Usage Description" field has been filled in the player settings.
|
||||
// This needs to be done first otherwise no cameras will be reported.
|
||||
if (!Application.HasUserAuthorization(UserAuthorization.WebCam))
|
||||
{
|
||||
yield return Application.RequestUserAuthorization(UserAuthorization.WebCam);
|
||||
}
|
||||
|
||||
// Make sure we're authorised for using the microphone. On iOS the OS will forcibly
|
||||
// close the application if authorisation has not been granted. Make sure the
|
||||
// "Microphone Usage Description" field has been filled in the player settings.
|
||||
// if (_capture.AudioCaptureSource == AudioCaptureSource.Microphone)
|
||||
{
|
||||
if (!Application.HasUserAuthorization(UserAuthorization.Microphone))
|
||||
{
|
||||
yield return Application.RequestUserAuthorization(UserAuthorization.Microphone);
|
||||
}
|
||||
if (Application.HasUserAuthorization(UserAuthorization.Microphone))
|
||||
{
|
||||
// On iOS modified the audio session to allow recording from the microphone.
|
||||
NativePlugin.SetMicrophoneRecordingHint(true);
|
||||
}
|
||||
}
|
||||
|
||||
// Create instance data per webcam
|
||||
int numCams = WebCamTexture.devices.Length;
|
||||
_instances = new Instance[numCams];
|
||||
for (int i = 0; i < numCams; i++)
|
||||
{
|
||||
GameObject go = (GameObject)GameObject.Instantiate(_prefab);
|
||||
|
||||
Instance instance = new Instance();
|
||||
instance.name = WebCamTexture.devices[i].name;
|
||||
instance.capture = go.GetComponent<CaptureFromWebCamTexture>();
|
||||
instance.capture.FilenamePrefix = "Demo4Webcam-" + i;
|
||||
instance.gui = go.GetComponent<CaptureGUI>();
|
||||
instance.gui.ShowUI = false;
|
||||
|
||||
_instances[i] = instance;
|
||||
|
||||
#if false
|
||||
WebCamDevice device = WebCamTexture.devices[i];
|
||||
Resolution[] resolutions = device.availableResolutions;
|
||||
if (resolutions != null)
|
||||
{
|
||||
Debug.Log($"Device '{device.name}' has {resolutions.Length} supported resolutions:");
|
||||
foreach (Resolution resolution in resolutions)
|
||||
{
|
||||
Debug.Log($"{resolution.width}x{resolution.height}@{resolution.refreshRate}");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (numCams > 0)
|
||||
{
|
||||
SelectWebcam(0);
|
||||
}
|
||||
}
|
||||
|
||||
private void StartWebcam(Instance instance)
|
||||
{
|
||||
// NOTE: WebcamTexture can be slow for high resolutions, this can cause issues with audio-video sync.
|
||||
// Our plugins AVPro Live Camera or AVPro DeckLink can be used to capture high resolution devices
|
||||
Debug.LogFormat("_webcamResolutionWidth: {0}, _webcamResolutionHeight: {1}, _webcamFrameRate: {2}", _webcamResolutionWidth, _webcamResolutionHeight, _webcamFrameRate);
|
||||
instance.texture = new WebCamTexture(instance.name);
|
||||
instance.texture.requestedWidth = _webcamResolutionWidth;
|
||||
instance.texture.requestedHeight = _webcamResolutionHeight;
|
||||
instance.texture.requestedFPS = _webcamFrameRate;
|
||||
instance.texture.Play();
|
||||
if (instance.texture.isPlaying)
|
||||
{
|
||||
instance.capture.WebCamTexture = instance.texture;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log(string.Format("Unable to start webcam in mode {0}x{1}@{2}", _webcamResolutionWidth, _webcamResolutionHeight, _webcamFrameRate));
|
||||
StopWebcam(instance);
|
||||
}
|
||||
}
|
||||
|
||||
private void StopWebcam(Instance instance)
|
||||
{
|
||||
if (instance.texture != null)
|
||||
{
|
||||
if (instance.capture != null && instance.capture.IsCapturing())
|
||||
{
|
||||
instance.capture.WebCamTexture = null;
|
||||
instance.capture.StopCapture();
|
||||
}
|
||||
|
||||
instance.texture.Stop();
|
||||
Destroy(instance.texture);
|
||||
instance.texture = null;
|
||||
}
|
||||
|
||||
_selectedWebcamIndex = -1;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
for (int i = 0; i < _instances.Length; i++)
|
||||
{
|
||||
StopWebcam(_instances[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private void SelectWebcam(int index)
|
||||
{
|
||||
// Stop any currently
|
||||
if (_selectedWebcamIndex >= 0)
|
||||
{
|
||||
StopWebcam(_instances[_selectedWebcamIndex]);
|
||||
_selectedWebcamIndex = -1;
|
||||
}
|
||||
|
||||
if (index >= 0)
|
||||
{
|
||||
_selectedWebcamIndex = index;
|
||||
for (int j = 0; j < _instances.Length; j++)
|
||||
{
|
||||
_instances[j].gui.ShowUI = (j == _selectedWebcamIndex);
|
||||
}
|
||||
StartWebcam(_instances[_selectedWebcamIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
#if (UNITY_IOS || UNITY_ANDROID) && !UNITY_EDITOR
|
||||
float sf = 2.0f;
|
||||
#else
|
||||
float sf = 1.0f;
|
||||
#endif
|
||||
GUI.matrix = Matrix4x4.Scale(new Vector3(sf, sf, 1f));
|
||||
float hw = Screen.width / (2f * sf);
|
||||
|
||||
GUI.skin = _skin;
|
||||
GUILayout.BeginArea(new Rect(hw, 0, hw, Screen.height));
|
||||
GUILayout.BeginVertical();
|
||||
|
||||
GUILayout.Label("Select webcam:");
|
||||
|
||||
for (int i = 0; i < _instances.Length; i++)
|
||||
{
|
||||
Instance webcam = _instances[i];
|
||||
|
||||
GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
|
||||
|
||||
if (webcam.capture.IsCapturing())
|
||||
{
|
||||
float t = Mathf.PingPong(Time.timeSinceLevelLoad, 0.25f) * 4f;
|
||||
GUI.backgroundColor = Color.Lerp(GUI.backgroundColor, Color.white, t);
|
||||
GUI.color = Color.Lerp(Color.red, Color.white, t);
|
||||
}
|
||||
|
||||
if (_selectedWebcamIndex == i)
|
||||
{
|
||||
GUI.backgroundColor = Color.green;
|
||||
}
|
||||
|
||||
if (GUILayout.Button(webcam.name, GUILayout.Width(hw * 0.5f), GUILayout.ExpandWidth(false)))
|
||||
{
|
||||
if (_selectedWebcamIndex != i)
|
||||
{
|
||||
SelectWebcam(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
StopWebcam(webcam);
|
||||
}
|
||||
}
|
||||
|
||||
GUI.backgroundColor = Color.white;
|
||||
GUI.color = Color.white;
|
||||
|
||||
if (webcam.texture != null)
|
||||
{
|
||||
float a = (float)_webcamResolutionHeight / (float)_webcamResolutionWidth;
|
||||
float w = (float)hw * 0.5f;
|
||||
Rect camRect = GUILayoutUtility.GetRect(w, w * a);
|
||||
GUI.DrawTexture(camRect, webcam.texture);
|
||||
}
|
||||
else
|
||||
{
|
||||
GUILayout.Label(string.Empty, GUILayout.MinWidth(256.0f), GUILayout.MaxWidth(256.0f), GUILayout.ExpandWidth(false));
|
||||
}
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
if (_selectedWebcamIndex >= 0 && _selectedWebcamIndex < _instances.Length)
|
||||
{
|
||||
Instance instance = _instances[_selectedWebcamIndex];
|
||||
GUILayout.Label($"WebCam FPS: {instance.capture.WebCamFPS}");
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
GUILayout.EndArea();
|
||||
}
|
||||
#else
|
||||
void Start()
|
||||
{
|
||||
Debug.LogError("[AVProMovieCapture] To use WebCamTexture capture component/demo you must add the string AVPRO_MOVIECAPTURE_WEBCAMTEXTURE_SUPPORT must be added to `Scriping Define Symbols` in `Player Settings > Other Settings > Script Compilation`");
|
||||
}
|
||||
#endif // AVPRO_MOVIECAPTURE_WEBCAMTEXTURE_SUPPORT
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98a052fe19e52c048865e758e854f078
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||