Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

EZ Replay Manager

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

  1. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Natively, It works with the old particle system, but only starting and stopping the particle effect is being recorded, so also while in replaying mode, the particle effect is rendered in real time. Nevertheless, I think with a little programming on your side you can make it work like you wish, also using the new particle system.
     
  2. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,008
    I'm looking for a replay solution for a racing game on iOS. I'd like the race to be replayed after the race has finished, but from various camera around the track. Is this possible with EZ Replay Manager?
     
  3. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Yes it is. The replay can be watched over and over again from every camera angle you wish.
     
  4. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,008
    Awesome, do you have any tutorials? :)
     
  5. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
  6. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,008
    Excellent, I'll take a look at that and the demo version. :)
     
  7. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,008
    Hmmm, i tried the demo and it seems to be trying to remove the vehicle physics scripts from the cars when I try to play a replay. Thing is, about 3 of the scripts require each other, so I'm getting about 50 errors! lol
     
  8. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Thanks for trying the demo and reporting back! :) Yes, indeed, it clones gameobjects like your vehicles and tries to remove scripts on these clones to not let physics or other code act while you are replaying a scene. For your convenience you can remove the @RequireComponent lines, or otherwise these error messages probably don't hurt anyone either :)

    Very glad to learn that the demo works on iOS?
     
  9. sunnyGamer

    sunnyGamer

    Joined:
    Nov 28, 2012
    Posts:
    6
    I have a game with rolling sphere with multiple components attached to it, to manipulate the gameplay. Also we have multiple gameobjects with explosions and animations morphing. when I tried the plugin to replay movement of rolling sphere, it recorded the movement without any issue, but when playing back it thrown many errors cause it removed the components attached to it and hence breaking the gameplay, Please suggest me the solution.
     
  10. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Removing of the components is required for replay. The removing is only done on clones, never on your real gameObjects. The errors mostly occur, if your scripts have a lot of "@RequireComponent" tags. Is that the case? If so, you can remove those tags, then the errors should disappear. Actually also when those errors occur, the game should still replay and run as expected, right? If you still have questions, the easiest and most accurate way for me to help you, is if you send me a demoscene which demonstrates your question/problem with the plugin.
     
  11. x68user

    x68user

    Joined:
    Nov 14, 2012
    Posts:
    2
    Hi Softrare

    I purchased a EZReplayManager.

    Although a variety of test and we found the problem.
    Disappear when I add a light object to be recorded.
    What should I do?
     
  12. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Hi! The solution is very simple: Either just don't record the light object at all, that way it will still be present in replay mode, shining light on everything, just as it would do in recording mode. Or if you must record the light object (i.e. because of movement) you must add Light to the components which are not being removed while replaying. To do that click on the EZReplayManager prefab, set the size of Components And Scripts To Keep At Replay to 1 and name the appearing element Light, then it will keep the light script at replay. For more information please refer to the official documentation at http://www.softrare.eu/user_files/unity/Readme.pdf . Hope I could help.
     
  13. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    One little addition: Please comment out line 173 in Object2PropertiesMapping.cs. This will avoid unnecessary output and speed up program execution. To do that just write // before the line like this:

    //MonoBehaviour.print(EZReplayManager.singleton.componentsAndScriptsToKeepAtReplay);
     
  14. x68user

    x68user

    Joined:
    Nov 14, 2012
    Posts:
    2
    Thanks for the reply.
    I'll try as described.
     
  15. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    SPECIAL X-MAS OFFER: 50% OFF! Buy EZReplayManager for a very limited time for 40$. Have nice holidays!
     
  16. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Merry Christmas everyone :)The special offer will expire very shortly, grab the 50% off now!
     
  17. gatsage

    gatsage

    Joined:
    Apr 19, 2012
    Posts:
    7
    Hi there, just added replay manager to my project to try it out and I am getting the following error:

    NullReferenceException: Object reference not set to an instance of an object
    EZReplayManagerDemo_Object2PropertiesMapping.prepareObjectForReplay ()
    EZReplayManagerDemo.EZReplayManager. (Int32 newMode)
    EZReplayManagerDemo.EZReplayManager.play (Int32 speed, Boolean playImmediately, Boolean backwards, Boolean exitOnFinished)
    EZReplayManagerDemo.EZReplayManager.OnGUI ()

    My games has a bike and a rider. The rider is a ragdoll with rigidbodies set to kinematic but when the bike crashes, the rider's rigidbodies are switched to non-kinematic and she does some nice crash moves.
    If I don't crash the bike, the replay works fine. If I crash, I get the above error.

    Any ideas?
     
  18. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Hi! Thanks for your message! In order to give you the best possible support, would you care to send me your scene? That way I don't have to create a scenario now which fits your description, as I have little time on my hands at the moment. Of course your content stays your content, I will not use it for other purposes than helping you fix this issue. You can send it to my email adres which displayed on this site: http://www.softrare.eu/contact.html .
     
  19. gatsage

    gatsage

    Joined:
    Apr 19, 2012
    Posts:
    7
    I took it upon myself to see if I can figure out what the problem was. As it turns out, when I crash, I disable a couple of gameObjects (IK scripts that keep hands on handlebars) and replay manager doesn't seem to handle tree changes very well. I didn't really need to do that so I have it working for now. As long as the transform hierarchy stays the same it is ok but if you destroy a branch during recording, you should be able to reproduce this.

    Cheers.
     
  20. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Good job investigating this issue, and even a better job finding a fix for it :) Its a known issue, it has to do with the algorithm I use for syncronizing the game objects in recording mode. I will look into it, maybe I can find a fix to include in a future version, in the meantime I will update the documentation asap. Again, nice that you found a workaround, hopefully it suits others in similar situations.
     
  21. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    715
    Last edited: Feb 16, 2013
  22. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Thanks for your message and your compliment! But the package is a replay system not a video editing tool. Sorry.
     
  23. Raghu

    Raghu

    Joined:
    Jan 15, 2013
    Posts:
    1
    Hi,
    I am doing a replay of dynamically loaded Prefab as a game object and i am making these game objects as a child to a parent, but in the replay mode the prefab which i am loading is not getting parented to the game object as it is in the hierarchy.
    I have attached Object2Record script for the dynamically loading Prefab, but the dynamically loaded prefab is taking the parent as EZReplayM_sParent instead of taking the parent as it is in the hierarchy.

    Please anybody provide the solution ASAP...
     
  24. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Hi! Thanks for your message. So you attach a prefab gameobject in runtime to a parent? Well I don't think this is supported at the moment. You could try to attach the child go at design time but put it on non-active. Then in runtime if you want to activate it, you do that, this will drastically change the situation as far as I can project at this point. Is that possible? At design time do you know what gameobject will be attached to the parent gameobject at a later point? If not this is difficult to solve. If you send the game scene to me I might have a shot at this, but no promises.
     
  25. roswel

    roswel

    Joined:
    Feb 21, 2013
    Posts:
    5
    this system can be animate manage camera after game record ? just like camera movie editor
     
  26. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Hi! Thanks for your message. But would you care to rephrase it? I do not really understand the question. Thank you very much!
     
  27. roswel

    roswel

    Joined:
    Feb 21, 2013
    Posts:
    5
  28. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Hi! I don't know if I understand the feature which you would like to see correctly.

    What you can do with this package is record standard and custom properties of gameobjects and replay them, resulting in the whole scene (at least all gameobjects that were marked for recording) to be displayed before your eyes, once you go in replay mode.

    If you decide NOT to record camera movement you can reposition the camera while the scene is being replayed and in this way you can watch the replay from every possible angle. If you DO record the camera movement, this movement is fixed in replay mode and so everything the camera sees while recording will also be visible during replay. Was it this what you were asking about?
     
  29. roswel

    roswel

    Joined:
    Feb 21, 2013
    Posts:
    5
    thanks for reply my target for make machinima from this system 1.play 2.record 3.reposition camera 4.make video files Thaks ^_^
     
  30. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    You cannot create video files with this extension natively. You would have to record the screen while replaying your scene, using a different screen-recording program. But you can indeed play your game, while recording and after recording reposition the camera and hit replay, and watch the scene replay from a totally different camera angle. Then you use your 3rd party screen recording software (like camstudio or something else) and you have your video :)
     
  31. roswel

    roswel

    Joined:
    Feb 21, 2013
    Posts:
    5
    Thank you ^_^ good support
     
  32. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Thank you, too!
     
  33. deekpyro

    deekpyro

    Joined:
    Oct 16, 2012
    Posts:
    57
    Hey there,

    I just picked up a copy of this package and noticed when I try to play back a recording of just one object I get a few errors. The first error I get (which repeats quite a few times) is

    "Destroying components immediately is not permitted during physics trigger/contact or animation event callbacks. You must use Destroy Instead." from Object2PropertiesMappting:prepareObjectForReplay().

    Thanks in advance.
     
  34. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Hi! Thanks for your message. I have never seen this error before, so blindly helping should be very difficult. The best way to help you would be to examine your scene. Therefor you could send it to me, or some representation of it which produces the same error.
     
  35. deekpyro

    deekpyro

    Joined:
    Oct 16, 2012
    Posts:
    57
    Ah, for the test I was doing I stopped recording and initiated playback in the physics loop. After moving the playback call outside of that location the errors went away.

    The object is getting properly disabled during playback but now a version of it is not appearing during playback (e.g. the playback consists of no objects).
     
  36. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    I understand there are still issues? If so, let me know, I can try to fix it for you if you wish. Thank you very much for purchasing anyway :)
     
  37. sunnyGamer

    sunnyGamer

    Joined:
    Nov 28, 2012
    Posts:
    6
    I have a scene with camera having multiple components attached to it, and I am marking it for recording. But as soon as I start the playback, it instantiates all the components attached to it, resulting throwing exceptions. I also have few more objects having the multiple components attached to them and what to record them too. Kindly provide some solution on how to disable the components attached to the objects which are not required during playback of the replay.

    Thank you,
    Aniket
     
  38. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Hi! Thanks for your message. I don't really understand whats happening actually. Could you send me a video, or the scene, or a representation of it, which results in the same errors?

    Normally components attached to gameObjects will be removed on playback-clones (for physics and gamelogic not to interfere with the replay), if you say these components get instantiated, then this is behaviour I haven't seen so far.
     
  39. sunnyGamer

    sunnyGamer

    Joined:
    Nov 28, 2012
    Posts:
    6
    I figured out the reason for the errors here. There were some snippets of the code accessing the disabled GameObjects while playing back replay.
    But now I have another question.
    1. Can we have control on the playback of the replay, e.g. currently, if I playback the replay in reverse, at the end of playback it always go to the end position again, instead of start position.
    2. In few scenes here I have multiple cameras and I am switching between them depending on the position of the target object, how to show the replay for such object.

    Thank you,
    Aniket
     
    Last edited: Mar 5, 2013
  40. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    All the scripts on your camera except for the "Camera" script itsself should be removed from the clone on replay. Isn't that happening? Or did you include an exception for some scripts?
     
  41. sunnyGamer

    sunnyGamer

    Joined:
    Nov 28, 2012
    Posts:
    6
    I figured out the reason for the errors here. There were some snippets of the code accessing the disabled GameObjects while playing back replay.
    But now I have another question.
    1. Can we have control on the playback of the replay, e.g. currently, if I playback the replay in reverse, at the end of playback it always go to the end position again, instead of start position.
    2. In few scenes here I have multiple cameras and I am switching between them depending on the position of the target object, how to show the replay for such object.

    Thank you,
    Aniket
     
  42. sunnyGamer

    sunnyGamer

    Joined:
    Nov 28, 2012
    Posts:
    6
  43. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    1. If you bought the full version you have the full source available, you can change whatever you like.
    2. I haven't actually tried that, but yes it is absolutly possible. How do you switch camera?
     
  44. sunnyGamer

    sunnyGamer

    Joined:
    Nov 28, 2012
    Posts:
    6
    I have a full version purchased here. I went through the source code, and I found some functions (UpdateRecording / execRecorderAction) where I should make the modifications, but not sure where to make the change after few attempts. I am sure it has to do with recorderPosition variable.
    What I need to do is record the particular sequence of the game, and play it backwards, and playback should stop at the original starting position of recording.

    For the 2nd question, I am switching the cameras by disabling them by changing their depths.

    Can you please provide some sample code snippet.

    -Aniket
     
  45. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    For 1st question I just sent you a PM with a possible solution. You were already looking at the correct spots I think.

    For 2nd: This should be easy too. Change SavedState.cs so that you record the depth property of the cameras (and of cource mark all cameras for recording). This is done exactly like position and rotation which are recorded by default. You should implement/change all functions (except for serVec3ToVec3 and serQuatToQuat) in SavedState.cs so that they work with the depth property. Keep in mind that you also put the same script on gameObjects which don't carry this depth-property so, before you access this property remember to check if it actually exists.

    Again: the best method of changing any vanilla plugin code is to write a new class, extend from the class you want to change a function of, override the function with your code and call that class instead of the vanilla one. You can set all functions and properties access level to protected as this will also be done in the next update.

    Hope this helps!
     
  46. WesleyHuang

    WesleyHuang

    Joined:
    Jan 15, 2013
    Posts:
    3
    Is there any way you can reduce the file size?
    I recorded one minute only, the file size already 100MB.
    Whether the same game like "Clash of clans" record?
     
  47. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Thanks for your message. You can reduce the file size drastically by descreasing the framerate with which the plugin records. You do this by acutally INcreasing the recordingInterval variable. Of course if you reduce the framerate too much the replay will lose visual quality but for most games you should adjust the framerate in order to optimize it for a particular game. In example for a turn based game without animations even a frame once a second is probably enough, whereas for an FPS it should at least be 25 frames per second. Frames per second = 1/recordingInterval .
     
    Last edited: Mar 8, 2013
  48. fooj

    fooj

    Joined:
    Mar 17, 2013
    Posts:
    9
    I'm running into this error while clicking replay, any idea?

    NullReferenceException: Object reference not set to an instance of an object
    Object2PropertiesMapping.prepareObjectForReplay () (at Assets/EZReplayManager/extension/scripts/Object2PropertiesMapping.cs:156)
    EZReplayManager.switchModeTo (Int32 newMode) (at Assets/EZReplayManager/extension/scripts/EZReplayManager.cs:341)
    EZReplayManager.play (Int32 speed, Boolean playImmediately, Boolean backwards, Boolean exitOnFinished) (at Assets/EZReplayManager/extension/scripts/EZReplayManager.cs:473)
    EZReplayManager.OnGUI () (at Assets/EZReplayManager/extension/scripts/EZReplayManager.cs:721)
     
  49. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    429
    Hi, can you tell me what is in line 156 in Object2PropertiesMapping.cs? I am working at a new version of the package and I don't have the old code anymore.
     
  50. ivzeus

    ivzeus

    Joined:
    Jan 28, 2013
    Posts:
    2
    Hi softrare, I'm using EZ Replay manager 1.4. I'm having issue when recording an object, described below:
    - The object A contains a child object, which is a UILabel. The UILabel has Animation component.
    - When the object A is stable, the UILabel will play its animation (for score display purpose).
    - I add EZReplayManager prefab to scene, then add object A to gameObjectsToRecord.
    When I replay the scene, the UILabel animation did not play at all because Update function of object A is not called.
    Do you have a solution for this case ? Or is it fixed already in latest version, if so I'll make an upgrade!
    Thank you very much !