dig dug mockup and began setting up a recorder prefab
This commit is contained in:
parent
f57b4512af
commit
1a6da03ae8
6 changed files with 152 additions and 1 deletions
|
@ -130,7 +130,6 @@ public class AssetSpace
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
oldOffConRot = input.offCon.physical.Rot();
|
||||
}
|
||||
|
||||
|
|
44
Assets/Scripts/Recorder.cs
Normal file
44
Assets/Scripts/Recorder.cs
Normal file
|
@ -0,0 +1,44 @@
|
|||
using UnityEngine;
|
||||
using UnityEditor.Recorder;
|
||||
|
||||
[RequireComponent(typeof(Camera))]
|
||||
public class Recorder : MonoBehaviour
|
||||
{
|
||||
// Make this a prefab, that way you can move it between scenes
|
||||
|
||||
[Header("References")]
|
||||
public Mesh mesh;
|
||||
public MeshRenderer viewFinderRend;
|
||||
|
||||
Camera cam;
|
||||
RecorderController recorder;
|
||||
|
||||
void Start()
|
||||
{
|
||||
cam = GetComponent<Camera>();
|
||||
|
||||
RenderTexture viewTex = new RenderTexture(512, 256, 16, RenderTextureFormat.Default);
|
||||
viewTex.Create();
|
||||
viewFinderRend.material.mainTexture = cam.targetTexture = viewTex;
|
||||
|
||||
RecorderControllerSettings settings = new RecorderControllerSettings();
|
||||
recorder = new RecorderController(settings);
|
||||
recorder.PrepareRecording();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
// Need to interact spatially with it, so buttons on the camera?
|
||||
// nah to imprecise? esp if the camera is moving...
|
||||
// then how do we get it to play nice with existing controls...
|
||||
// its just one button for now so we can squeeze it in somewhere
|
||||
|
||||
// Hook up to unity recorder system (only works in editor :/)
|
||||
// Record
|
||||
// recorder.StartRecording();
|
||||
// End
|
||||
// recorder.StopRecording();
|
||||
|
||||
// Pause (nice in theory annoying in practice *need to trim and adjust clips)
|
||||
}
|
||||
}
|
11
Assets/Scripts/Recorder.cs.meta
Normal file
11
Assets/Scripts/Recorder.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e19de3c166899cf46b2aa22dee06446c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/digdugdraft.blend
Normal file
BIN
Assets/digdugdraft.blend
Normal file
Binary file not shown.
96
Assets/digdugdraft.blend.meta
Normal file
96
Assets/digdugdraft.blend.meta
Normal file
|
@ -0,0 +1,96 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3a8cb8d46fd67cd4e860e21044e40166
|
||||
ModelImporter:
|
||||
serializedVersion: 19300
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 1
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -3,6 +3,7 @@
|
|||
"com.unity.collab-proxy": "1.2.16",
|
||||
"com.unity.ide.rider": "1.1.4",
|
||||
"com.unity.ide.vscode": "1.1.3",
|
||||
"com.unity.recorder": "2.2.0-preview.4",
|
||||
"com.unity.test-framework": "1.1.3",
|
||||
"com.unity.textmeshpro": "2.0.1",
|
||||
"com.unity.timeline": "1.2.6",
|
||||
|
|
Loading…
Add table
Reference in a new issue