diff --git a/Assets/Scripts/AssetSpace.cs b/Assets/Scripts/AssetSpace.cs index 9f8160b..cce0e30 100644 --- a/Assets/Scripts/AssetSpace.cs +++ b/Assets/Scripts/AssetSpace.cs @@ -130,7 +130,6 @@ public class AssetSpace } } - oldOffConRot = input.offCon.physical.Rot(); } diff --git a/Assets/Scripts/Recorder.cs b/Assets/Scripts/Recorder.cs new file mode 100644 index 0000000..2d805a2 --- /dev/null +++ b/Assets/Scripts/Recorder.cs @@ -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(); + + 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) + } +} \ No newline at end of file diff --git a/Assets/Scripts/Recorder.cs.meta b/Assets/Scripts/Recorder.cs.meta new file mode 100644 index 0000000..410730e --- /dev/null +++ b/Assets/Scripts/Recorder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e19de3c166899cf46b2aa22dee06446c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/digdugdraft.blend b/Assets/digdugdraft.blend new file mode 100644 index 0000000..8408e6c Binary files /dev/null and b/Assets/digdugdraft.blend differ diff --git a/Assets/digdugdraft.blend.meta b/Assets/digdugdraft.blend.meta new file mode 100644 index 0000000..ab485c8 --- /dev/null +++ b/Assets/digdugdraft.blend.meta @@ -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: diff --git a/Packages/manifest.json b/Packages/manifest.json index 5554010..6f4cf50 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -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",