Search Unity

EZ Replay Manager

Discussion in 'Assets and Asset Store' started by softrare, Jun 12, 2011.

  1. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Oh ok! Write me an email, and we'll figure it out ;)
     
  2. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    edited my reply above., seems to stem from a null pointer in the fpbodyanimator. maybe that somehow causes him to teleport.. It would be amazing to get this working with UFPS!..
     
  3. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    I emailed you :)

    With fresh clean project (only UFPS and EZReplay) it works a lot better, looks like mostly its just not the body animations that are working ,does it support mecanim?

    Even if it cant do 3rd person full body awareness it will still be useful for me to do first person recordings, but it seems to jerk a bit too when playing back, what can cause that?

    Also noticed the 3rd person guy gets messed up, so things like looking at your feet, gun, shadows etc look really odd, but its close!..
     
    Last edited: May 18, 2018
  4. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    anyone managed to record a 3rd person mecanim character that walks around using this ??
     
  5. hammadzahidfinz

    hammadzahidfinz

    Joined:
    Jun 25, 2018
    Posts:
    6
    Hi,
    I want to replay a soccer game. How can I optimize replay duration to latest 40 replay positions and discard before that????
     
  6. hammadzahidfinz

    hammadzahidfinz

    Joined:
    Jun 25, 2018
    Posts:
    6
    Hi,
    what about if I want to play replay of latest 20-30 recording positions and discard last recording length...
    How can I achieve this?
     
  7. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Hi! The next version of EZR will be able to do that. I have it working already, but needs some rounding up and uploading.
     
  8. commodore

    commodore

    Joined:
    May 30, 2012
    Posts:
    40
    I had gotten it working in just a few minutes when I tried it a while ago
     
    softrare likes this.
  9. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Hi Everyone! I am happy to announce that version 2.0 has hit the store! One big new feature implementd is "Buffering" of most recent x seconds!

    Saved replays are not compatible with previous versions anymore as EZR now uses JSON.Net instead of binary files.

    If you like the update, please consider a rating and/or review! If you have any questions or problems, please let me know, and we will work it out, if necessary through teamviewer ;)
     
  10. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Small bugfixing update is on the way.
     
  11. UnityUser00

    UnityUser00

    Joined:
    Feb 4, 2016
    Posts:
    4
    Hi,

    I've bought your plugins and I must say its very well made.

    However, I've ran into a trouble recently.

    I'm recording an animated character and since his material can change, I've added recording for that in the SavedState.cs

    Here is the code that I've added:

    Code (CSharp):
    1. if (go.GetComponent<SkinnedMeshRenderer>() != null)
    2. {
    3.      _material = go.GetComponent<SkinnedMeshRenderer>).material;
    4. }
    Code (CSharp):
    1. if (!changed && _bodyMaterialID != otherState._bodyMaterialID)
    2.             changed = true;
    Code (CSharp):
    1. if (go.GetComponent<SkinnedMeshRenderer>() != null)
    2.         {
    3.             go.GetComponent<SkinnedMeshRenderer>().material = _material;
    4.         }

    It works fine, but the issue is when I want to save and load the Replay from a file.
    When I load and play the recorded file, the character as no texture at all on it.

    Can you help me fix that ?

    Thanks in advance
     
  12. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Hi! Thanks for your message.

    Can you post the whole SavedState.cs?
     
  13. UnityUser00

    UnityUser00

    Joined:
    Feb 4, 2016
    Posts:
    4
    Thank you for the fast answer !

    Here is the SavedState.cs file.
     

    Attached Files:

  14. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
  15. UnityUser00

    UnityUser00

    Joined:
    Feb 4, 2016
    Posts:
    4
    I did upgrade the plugins.

    Some objects that were recorded fine before are not recorded anymore. These correspond to the objects directly linked in the EZReplayManager script on the scene.

    The other issue didn't evolve.
     
  16. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    I hope you made backup. Before upgrading any plugin you should make a backup. I am sorry for not mentioning it, I see it as self-explanatory, but I recognize this is not the case for everyone.

    No, the issue is not solved by this, but I cannot help you with outdated software.

    EZR works in the same way as before, just make sure you remove the EZR cache (by deleting the folder: (Assets-root)/Resources/EZReplayManagerAssetPrefabs) and try again, there should not be a difference in what gets actually recorded. Oh and note that old savegames do not work anymore after the upgrade.
     
  17. UnityUser00

    UnityUser00

    Joined:
    Feb 4, 2016
    Posts:
    4
    Don't worry, I indeed made backups. I was mentioning it in case you had a quick fix for it.

    I tried removing the cache and it did the same work it did the first time. However, the issues are still the same :

    -Objects working before don't get recorded now
    -If I load the replay from a file, the character doesn't have any material on it.

    Edit : I tried replacing the stocking of materials by stocking materialID that gives the right material to set to the character.

    Again, it seems to work fine with the normal replay, but loading the file always gives me ID = 0.
    I think before it was giving material = null. That would explain a lot of things.

    So I guess when ezr saves the replay to a file, it gives added variables a null value.
     
    Last edited: Nov 22, 2018
  18. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Hi, sorry you had to wait. Yes, setting an ID instead of a material is the right way to go, it should not be 0 though. Can you post the latest SavedState.cs?
     
  19. Towerss

    Towerss

    Joined:
    Feb 17, 2018
    Posts:
    8
    Hi there,

    I just bought the plugin a few weeks ago, and I am going through the Read Me pdf file. I found out it is a bit outdated. Also, I am having issues when trying to run examples. Unity Unity 2018.2.13f1 (64-bit) simply freezes.

    The project I am working on requires to save the scene on Android devices, and then reploduce the saved scenes on WebGL.

    Could you please advise:
    1. about more updated documenation.
    2. A way to achive my application requirements?

    Regards,

    Diego
     
  20. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Hi! Thanks for your questions!

    I will try and answer them beneath.

    1. The documentation is a little outdated, that is true. What part of it specifically would you like to have better info on?
    2. Sure there are ways to make that happen. What is it you need help with? I don't know whether I already tried EZR in that particular version of Unity, but I don't see any reason why it wouldn't work. Have you tried all example scenes on a "good enough"/modern device and is the problem with freezing reproducible?
     
  21. reinaldoivan

    reinaldoivan

    Joined:
    Mar 21, 2018
    Posts:
    1
    Hi, I've just checked out this asset, and I'm wondering if there's any limitation to how long we could record the scene with many objects? And also, is it possible to do more than one recording at one time?
     
  22. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Hi! Thanks for your questions!

    There is no theoretical hard limit, the only limit would be your memory, because the frames are saved there if not saved to file. Unfortunately it's not possible to record more than 1 recording at the same time. You can however record more than 1 object at a time.
     
  23. SnowblindFatal

    SnowblindFatal

    Joined:
    Jun 9, 2014
    Posts:
    20
    Is it possible to extend upon a recording?

    Say I start recording, let the game progress for a little while and then pause and watch the replay. Is it possible to extend upon this replay when the game is continued again, so that after the next bit of playing, the replay could be watched from the very beginning? If not, is it possible to chain separate recordings to form a coherent whole?

    Thanks in advance. I'm considering buying your product.
     
  24. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Hi! Thanks for the question! This is not functionality provided out-of-the-box but I imagine you could easily add it, by not resetting the frame pointer variable, thereby continuing an earlier recording. I hope this helps!
     
  25. SnowblindFatal

    SnowblindFatal

    Joined:
    Jun 9, 2014
    Posts:
    20
    Hello. Thanks for the response earlier! I bought the asset and immediately after importing it into the editor I get the following error:



    Mono.CompilerServices.SymbolWriter.MonoSymbolFileException: Symbol file `Assets/EZReplayManager/extension/external/JSON.NET/JsonNet/Newtonsoft.Json.dll.mdb' does not match assembly
    at Mono.CompilerServices.SymbolWriter.MonoSymbolFile.ReadSymbolFile (System.String mdbFilename, System.Guid assemblyGuid) [0x00029] in <42af2190f59f4f56803a83e1b03d02ee>:0
    at Mono.Cecil.Mdb.MdbReaderProvider.GetSymbolReader (Mono.Cecil.ModuleDefinition module, System.String fileName) [0x00019] in <42af2190f59f4f56803a83e1b03d02ee>:0
    at Mono.Cecil.ModuleReader.ReadSymbols (Mono.Cecil.ModuleDefinition module, Mono.Cecil.ReaderParameters parameters) [0x00032] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at Mono.Cecil.ModuleReader.CreateModule (Mono.Cecil.PE.Image image, Mono.Cecil.ReaderParameters parameters) [0x00081] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at Mono.Cecil.ModuleDefinition.ReadModule (Mono.Disposable`1[T] stream, System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0000d] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0006c] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at AssemblyUpdater.Core.AssemblyUpdaterContext.ReadAssembly (System.String assemblyPath, APIUpdater.Framework.Log.IAPIUpdaterListener listener, System.IO.FileAccess mode, System.String nugetPath, System.String[] searchPaths) [0x00072] in <beff41bd86dd48a09189802b70907c29>:0
    at AssemblyUpdater.Core.AssemblyUpdaterContext.From (System.String assemblyPath, APIUpdater.Framework.Configuration.IConfigurationProvider configuration, System.String[] assemblySearchPaths, System.String nugetPath, AssemblyUpdater.Core.UpdaterMode mode, APIUpdater.Framework.Log.IAPIUpdaterListener listener) [0x0002c] in <beff41bd86dd48a09189802b70907c29>:0
    at AssemblyUpdater.Core.AssemblyUpdaterContext.From (System.String assemblyPath, System.String[] assemblySearchPaths, System.String nugetPath, AssemblyUpdater.Core.UpdaterMode mode, APIUpdater.Framework.Log.IAPIUpdaterListener listener) [0x00001] in <beff41bd86dd48a09189802b70907c29>:0
    at AssemblyUpdater.Application.Program.CheckForObsoleteAPIUsage (AssemblyUpdater.Application.CommandLineSpec config, APIUpdater.Framework.Log.ConsoleUpdateListener logger) [0x00013] in <beff41bd86dd48a09189802b70907c29>:0
    at AssemblyUpdater.Application.Program.Main (System.String[] args) [0x00057] in <beff41bd86dd48a09189802b70907c29>:0
    UnityEditor.Scripting.APIUpdaterAssemblyHelper:DoesAssemblyRequireUpgrade(String)



    Also a whole bunch of warnings (total 20) such as:


    Assets\EZReplayManager\Editor\PropertyEditor.cs(7,29): warning CS0108: 'PropertyEditor.serializedObject' hides inherited member 'Editor.serializedObject'. Use the new keyword if hiding was intended.




    Assets\EZReplayManager\Editor\PropertyEditor.cs(126,21): warning CS0618: 'EditorGUILayout.ObjectField(Object, Type, params GUILayoutOption[])' is obsolete: 'Check the docs for the usage of the new parameter 'allowSceneObjects'.'




    Assets\EZReplayManager\Editor\PropertyEditor.cs(7,29): warning CS0108: 'PropertyEditor.serializedObject' hides inherited member 'Editor.serializedObject'. Use the new keyword if hiding was intended.




    Assets\EZReplayManager\Editor\PropertyEditor.cs(272,70): warning CS0618: 'Handles.ArrowCap(int, Vector3, Quaternion, float)' is obsolete: 'Use ArrowHandleCap instead'
    Shader warning in 'FX/Diamond': Support for SetTexture combiner +- has been removed at line 28


    What gives?
     
  26. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Hi! What version of Unity are you using? I'll then try it right away.
     
  27. SnowblindFatal

    SnowblindFatal

    Joined:
    Jun 9, 2014
    Posts:
    20
    Hi, thanks for the reply! I'm using out of the box 2018.3.11f1 free edition. Project's scripting runtime is ".Net 4.x Equivalent" (the default setting)
     
  28. SnowblindFatal

    SnowblindFatal

    Joined:
    Jun 9, 2014
    Posts:
    20
    Ok, I saw that there's a new version. I also tried the 2018.3.12f1 and got the same results.
     
  29. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Hi! I just tried it. I only got the error

    Mono.CompilerServices.SymbolWriter.MonoSymbolFileException: Symbol file `Assets/EZReplayManager/extension/external/JSON.NET/JsonNet/Newtonsoft.Json.dll.mdb' does not match assembly

    And you can simply and without any consequences resolve it by removing that file Assets/EZReplayManager/extension/external/JSON.NET/JsonNet/Newtonsoft.Json.dll.mdb

    I will upload an updated version right now. Thank you for reporting!
     
  30. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Ah yes, and about the "warnings", don't worry about them, they are not harmful in any way. Will attend to them at the proper time, right now deep in development for new versions of my assets!
     
  31. SnowblindFatal

    SnowblindFatal

    Joined:
    Jun 9, 2014
    Posts:
    20
    Very good, thank you!

    Yeah I realise the warnings don't really matter but moving from a project with 0 warnings to a project with >0 warnings brings pain to my gentle heart. ;)

    But feel free to take your time and focus on more important matters. I'm satisfied with this answer for now!
     
  32. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Good to hear, if anything new arises let me know! :)
     
  33. SnowblindFatal

    SnowblindFatal

    Joined:
    Jun 9, 2014
    Posts:
    20
    I ran my first demos today and it's looking good! The interface is simple and intuitive. Very nice work!

    Some technical questions:

    My basic idea is to have a few dozens actors running and shooting at each other in my level. The level consists of "smallish" (~one character width) blocks that are destructible. Obviously both the actors and the level architecture needs to be recorded.

    What optimisations do you use in the recording? I applied the record functionality to my simple test level (~200 architecture objects) and didn't see memory usage skyrocket, so either this just doesn't use that much memory or you skip frames on objects when there is no difference to the last frame. Correct? What do you feel will be the limiting factor in this kind of setup (if I have, say, 30 seconds of record data)? CPU? Memory? How many game objects could I roughly use in my levels to keep these values at a sane level? Yeah I know I could empirically test this out and I certainly will, but I'd like to hear a couple of words from you as well to know what you think will be the bottleneck. :) Also I assume that level loading times will increase as the replay manager creates all the copies of my objects?

    After reading through the documentation it seems that the out of the box solution should work for my purposes for the most part. I'll just have to make sure that decals (bullet holes, etc.), particle effects (explosions, bullet trails, etc.) and animation states are included in the replay data. Maybe these will work out of the box too. I'll have to see!

    And finally, I'd like to have a camera mode for following a character during replay too. I have already implemented this in "normal play", so I guess for the recorded actors, I'll just include a script which allows them to be marked for following to be copied so that the replay objects have this same feature too?

    Sorry for the many questions. :D I promise I'll go back to my development bunker after this so you can focus on more important things.

    Dropped you a well deserved positive review! This is a feature I really wouldn't have wanted to program on my own. :D
     
    softrare likes this.
  34. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Very happy to hear it!!

    Yes, absolutely correct, only keyframes are recorded and between those it's all interpolated. And that is a very good point for optimization: Because of the interpolation you can basically choose a very high recording interval (which results in a low amount of frames to be recorded) and it should still look smooth. Just experiment with different values.

    I would indeed say, test it out. Usually 10s of objects are not a problem, in some situations even more, but this then again depends mostly on how much movement there is, the recording interval and last but not least the hardware being used to record and replay.

    You will probably indeed have to make sure to include these in the recording data, except for animations, they should be recorded completely out-of-the-box.

    If I understand correctly you want the camera to be recorded? This is very simple, just mark them for recording like all the rest of the objects.

    Thank you so much! This is so helpful!!
     
  35. SnowblindFatal

    SnowblindFatal

    Joined:
    Jun 9, 2014
    Posts:
    20
    Thanks for the response!

    I want the player to be able to control camera during replay. Freecam works fine as its behaviour is identical in both normal mode and replay mode, but I've a character follow camera that the player can rotate and zoom around, and I'd like the player to be able to pick which character to follow during replays and gameplay. But as I said, I've already a plan for this.


    Assets/Resources/EZReplayManagerAssetPrefabs should be added to gitignore, right? Would be cool to be able to do some custom functionality to these, but since these are obviously generated, no point in doing changes that would get overwritten anyway. What would be a good way for an object to know whether it's the real deal or the replay copy? I suppose one way would be to check whether it has some component that is not copied to the replay version, but this seems a bit clumsy.
     
  36. SnowblindFatal

    SnowblindFatal

    Joined:
    Jun 9, 2014
    Posts:
    20
    Ahh, I've ran into a problem. :) The copied character objects don't have the collider I've assigned to them. Is it possible to add the collider information to the copied objects? I tried

    EZReplayManager.get.componentsAndScriptsToKeepAtReplay.Add("CapsuleCollider");
    and
    EZReplayManager.get.componentsAndScriptsToKeepAtReplay.Add("Capsule Collider");
    and
    EZReplayManager.get.componentsAndScriptsToKeepAtReplay.Add("Collider");

    but none of them worked. This is problematic as I would like to register clicks on my characters

    Also I see that the layer information is not copied. I've got a workaround already in mind for this one, but using the actual layer would be preferable! Is this possible? I guess same for tags, too, but layers are more important.
     
    Last edited: Apr 18, 2019
  37. SnowblindFatal

    SnowblindFatal

    Joined:
    Jun 9, 2014
    Posts:
    20
    Hm, there might be a bug in my stuff here. Just created a simple clean object and the collider was copied nicely. OH WELL!


    EDIT: Ahhh found it! The cached prefabs in Resources/EZReplayManagerAssetPrefabs were out of date! Deleted the folder and everything works now as expected! I was already debugging through your component filtering code before it struck me. :rolleyes:
     
    Last edited: Apr 18, 2019
  38. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Yes, that is possible. In that case don't add the camera to the recorded objects surely and make your logic so that you follow "EZR_Clone" objects. This script is being added to every replay clone, that's how you can distinguish between them.

    Not necessarily, you can do that if you regularly purge the cache, but the cache doesn't get overwritten automatically.
     
  39. SnowblindFatal

    SnowblindFatal

    Joined:
    Jun 9, 2014
    Posts:
    20
    Yeah I got my things working yesterday the way I want to for the most part. Only the layer copying is something I would still yearn for. Now I've just included a dummy "potential camera target" script for my character GameObjects that gets included in the replay copying. When my camera shoots a ray on user click, it checks that the ray hit object has this script and makes the camera follow it in that case. It's not perfect since with layers, I wouldn't have to care if something else is blocking the view to the character as the ray would go through whatever's not in the "camera target" layer.

    Once again, thank you for your support.
     
  40. BlackAnt2019

    BlackAnt2019

    Joined:
    May 4, 2019
    Posts:
    1
    hello ,when i load a file by loadFromFile function ,it will report a error,


    NullReferenceException: Object reference not set to an instance of an object
    Object2PropertiesMapping.synchronizeProperties (System.Int32 recorderPosition) (at Assets/EZReplayManager/extension/scripts/Object2PropertiesMapping.cs:332)
    EZReplayManager.execRecorderAction () (at Assets/EZReplayManager/extension/scripts/EZReplayManager.cs:530)
    EZReplayManager.updateRecording (System.Int32 action) (at Assets/EZReplayManager/extension/scripts/EZReplayManager.cs:556)
    EZReplayManager+<waitForNewUpdate>d__75.MoveNext () (at Assets/EZReplayManager/extension/scripts/EZReplayManager.cs:620)
    UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)

    How to solve it? unity 2018.3 thank you
     
  41. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Hi! Did you make changes to EZR or do you possibly not use the latest version?
     
  42. SpindizzyGames

    SpindizzyGames

    Joined:
    Jun 29, 2017
    Posts:
    108
    Is this asset useful for updating & sync'ing networked multiplayer game states?
     
  43. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Hi! No, but take a look at my other asset - uMMO for this, I have my own very efficient working routine for that purpose.

    Link in the signature
     
  44. AMAT_Sooraj

    AMAT_Sooraj

    Joined:
    Sep 20, 2018
    Posts:
    6
    @softrare I have a situation where I want to play a timeline in unity editor and record it in playmode using EZ Replay manager and replay it in the build. Its pretty straight forward except that I make changes to material instances in the scene using the timeline. For eg. I change shaders of the material instance. Is it possible for me to record this out of the box or do I have extend?
     
  45. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Hi! For shader-/material-changes you need to extend the class that holds the information what needs to be recorded indeed.

    Hope this helps!
     
    Last edited: Nov 15, 2019
  46. sourav4000

    sourav4000

    Joined:
    Jun 14, 2014
    Posts:
    10
    Hello,
    Can this asset record GameObjects Instantiated and Destroyed? I want to achieve a Killcam like Call Of Duty using this. Is it possible? The free version is no longer available so, please confirm.
     
  47. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Yes, that is possible. Indeed also with newly instantiated and destroyed objects.
     
  48. sourav4000

    sourav4000

    Joined:
    Jun 14, 2014
    Posts:
    10
    Thank You for your confirmation. Can I download the trial version before purchase?
     
  49. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    I am sorry, the trial version is not available anymore.
     
  50. squallfgang

    squallfgang

    Joined:
    Sep 13, 2016
    Posts:
    21