Git Product home page Git Product logo

inputvcr's Introduction

InputVCR README

Record and playback player actions without the fuss.

What

Why write a custom recording class for your game, when much of it is identical? InputVCR records inputs you choose to text, then, when you want to replay, will automatically send these inputs to any Gameobject, without having to effect the others. You can use InputVCR to record player motion and any actions they take, for match replays, kill cams, puzzles, companions, and more.

How

InputVCRRecorder

InputVCRRecorder is the main class of the package, think of it like a VHS player.

Inputs that should be recorded should be added to the Recorded Buttons/Axes/Keys lists (Buttons and Axes use the names as defined in the Unity Input Manager) Mouse inputs (position + button states) can also be recorded, if the recordMouseEvents flag is true Touches coming soon maybe!

To start recording, call Record() or RecordNew() While recording, input values are saved to a Recording object each frame. To save additional arbitrary properties to a frame, call SaveProperty, with a key and string value

To stop recording, call Stop() or Rewind()

To start playing back a recording, call Play(), if no recording is provided, the last used recording will be used. Note that recordings will start playing back from their current playback point unless otherwise specified. Be kind, rewind!

Code that needs playback Input values needs to call Input methods via the VCRRecorder rather than Input directly: e.g: Change Input.GetButtonDown( "Jump" ) to myInputVCRRecorder.GetButtonDown( "Jump" ). This function will return the live Input values when stopped or recording, but will return values as saved in the recording while in playback Saved property values can be retrieved with TryGetProperty

Recording

This is the VHS tape. It holds the recorded input values for each frame for the length of the recording. You shouldn't need to call any methods on this directly, although the Length property (in seconds) might be useful. This object can be passed around to be played back in other InputVCRRecorders, or saved for later. If you want to save a Recording when playback ends, it must first be Serialized so it can be saved to disk. Call .ToJson() to get a json string. The InputVCRRecorder class also provides utility methods to save/load the current recording to and from disk

InputVCRTextRecordingLoader

This is a helper class to automatically load and optionally start playing a Recording saved in Json form.

InputVCRTransformSyncer

Helper class to automatically save the transform state of an object to a recording, and to sync it up. This is to prevent "drift" of objects due to different frame times or physics.

See the Examples folder for a demo, and check the code for more detailed documentation

Easy!

Info

More information and tools at eddiecameron.fun, @eddiecameron, or [email protected]

inputvcr's People

Contributors

eddiecameron avatar

Stargazers

 avatar PoopHip avatar Hardwin Bui avatar Fortes avatar  avatar  avatar Alex avatar Cory Corvus avatar Harry Kilian avatar  avatar Jon Manning avatar Quantum Duck Studio Ltd. avatar Matt Spurlin avatar Vinicius Hashirama avatar Andreas Berger avatar Tin Chagwedera avatar GAURAV avatar  avatar Nick Rodriguez avatar Matthew Thompson avatar Riley Tippetts avatar Ben Vance avatar [account locked] avatar Jack Bartolone avatar Kuan-Ting Chou avatar Pulaski Zhang avatar Min avatar  avatar Chen Chen avatar Matt Sylvia avatar Warren Francis avatar Derek Stobbe avatar Andrew W Hung avatar eriseven avatar XANDER avatar syco avatar  avatar Neeraj Kumar avatar  avatar Mohammad Reza Taesiri avatar Gustav avatar  avatar Sorab Pithawala avatar JT5D avatar Michael Campagnaro avatar Matt "Trip" Maker avatar  avatar Mr zhan avatar  avatar  avatar  avatar Michael Pizik avatar  avatar Dave Buchhofer avatar Chris Brough avatar Christian Helmich avatar Guts Rodsavas avatar  avatar Tuan Kuranes avatar Mihail Szabolcs avatar Robert Stehwien avatar

Watchers

 avatar syco avatar Mr zhan avatar James Cloos avatar  avatar  avatar  avatar Nick Rodriguez avatar Andreas Berger avatar Rahul Y Gupta avatar  avatar  avatar

inputvcr's Issues

working with Unity 5.x?

I am new to Unity and need to capture some input so I can replay those actions during a 'demo' that isn't rendered to a video but actually showing the game rendering in real-time. I think this is the right tool to use?

I tried to use the example scene in 5.3 without luck... any advice?

In Game Video recording Urgent

Hi,

I read post and found that your software support In Game Play Recording functionality for unity Web based Games.

But the link of unity Game is not recording when i press R and than P to Play nothing happened?

We are creating a game for unity 3D web based and want to record a part of the Game and reply it and share that part on Youtube for promotion purpose.

Is your software is capable to do that?

Look forward for a quick response

Kind Regards,
Mark
Email: [email protected]

Example missing InputVCRRecorder instance?

Thanks @EddieCameron, this library sounds exactly like what I was looking for.

From the example though, I'm a bit confused: Where does the InputVCRRecorder recorder; instance actually come from? I see some forks have used recorder = FindObjectOfType<InputVCRRecorder>(); but that failed, too, as there is no place the recorder is instantiated...

Would be great if you could give me a hint or even extend the example a bit!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.