Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[Released] Ultimate Replay 2.0 - Next generation state-based replay system

Discussion in 'Assets and Asset Store' started by scottyboy805, Sep 8, 2020.

  1. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,169
    Ultimate Replay 3.0 will be released very soon ;).
    We have now confirmed the release date of 15th September 2023 onto the Unity asset store. More info in the WIP thread here. In the meantime you can try it out via the open beta which is currently ongoing.
     
  2. Amen666

    Amen666

    Joined:
    Apr 3, 2020
    Posts:
    2
    Hi, I'm currently trying to work with this asset on my mirror project, but after the first record somehow I can't record again and this error appears. Also, I can't play the record result, did someone know how to fix this?

    upload_2023-8-10_15-23-14.png
     
  3. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,169
    Hey, It looks like you are trying to record into the same memory storage multiple times? It is possible but you will first need to clear any old data that was recorded (to avoid unintended data loss) by calling `ReplayMemoryTarget.Clear()` before `BeginRecording`. That should solve the recording issue.
    You also say playback is not working? Would you mind explaining a bit about that issue also. Do you get any errors or warnings, or does nothing happen at all? Any extra info will be very helpful.
     
  4. Amen666

    Amen666

    Joined:
    Apr 3, 2020
    Posts:
    2
    For the playback, when I first play it, nothing happens, then when I tried for the second time it sends me an error message. I guess it happens because I use additive scene on mirror? I've tried using it on different mirror examples with single scene and it works, but when I use it with the additive scene it doesn't. Btw I use the replay controls game object from the example and my prefabs already have replay object & replay transform on them
    upload_2023-8-11_9-12-36.png upload_2023-8-11_9-12-59.png
     
    Last edited: Aug 11, 2023
  5. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,169
    Ok in that case the problem is caused because the replay object is not added to the replay operattion. The reason for that is the replay system will only find replay objects in the current active Unity scene by default, and since you are using additive scenes I guess the replay object is located in a different scene?
    It is no problem but you will just need to let the replay system know where it can find your replay object by providing a `ReplayScene`. A replay scene is just a collection of replay obejcts that you can add to manually, but I think in your canse you might like to use one of the helper methods which can detect all replay objects in a given Unity scene like so:

    Code (CSharp):
    1. // Scan the specified Unity scene to finb all replay objects
    2. ReplayScene scene = ReplayScene.FromScene(SceneManager.GetSceneByName("My Scene Name"));
    Once you have done that then you can pass the replay scene to the `BeginPlayback` method like so:

    Code (CSharp):
    1. ReplayStorageTarget storage = ...
    2.  
    3. // Start playback
    4. ReplayHandle handle = ReplayManager.BeginPlayback(storage, scene);
    Note that if you are using the built in replay controls, you will need to make that change to `ReplayControls.cs` found in `Assets/Ultimate Replay 2.0/Scripts/`.

    The error you are getting means that you are calling `BeginPlayback` with the same storage target multiple times. That is not allowed since the storage can only be used for one replay operation at any time, so I think it will just be a case of making sure you call `StopPlayback` before you try to use the storage again.

    Hope that helps. Let me know if you are still having issues.
     
  6. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,169
    Only 1 week now until Ultimate Replay 3.0 is officially released on the asset store :cool:

    Check out the WIP thread here and the official support and marketing thread here.

    If you are a previous user of Ultimate Replay 2.0, you will be entitled to a highly reduced upgrade price to move from 2.0 - 3.0 which will be handled by Unity asset store upgrade system. Simply login to the Unity account used to purchase version 2.0 and the Unity asset store will automatically show you the reduced price when viewing the Ultimate Replay 3.0 store page. The actual upgrade price may vary but will usually be within the region of 25% of the full purchase price. For any more information about upgrading feel free to contact us for help.

    Ultimate Replay 2.0 will remain available on the asset store for long term support, and will continue to receive bug fixes in that time, but note that new features will likley not be added. Also note that version 2.0 will be marked as legacy at that time and we would encourage users to update to version 3.0 if possible. Feel free to contact us if there are any question.
     
    Trigve likes this.
  7. avicenteUnity1234

    avicenteUnity1234

    Joined:
    Jun 2, 2023
    Posts:
    7
    Hello, I get the following error, when recording for the second time, when I go to view the recording, the scene that is recorded is seen but my character does not move, what am I doing wrong?

    The component have a replayObject script.
     
    Last edited: Sep 29, 2023
  8. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,169
    Hi, Would you be able to attach a screenshot of the error message and the stack trace if possible, or you can copy and paste the error and stack trace if that would be easier.
    I will take a look then as it sounds like it could be a bug.
     
  9. avicenteUnity1234

    avicenteUnity1234

    Joined:
    Jun 2, 2023
    Posts:
    7
    I think I fixed it in the ReplayManager.cs, in the BeginRecording method:

    if (recordScene == null)
    recordScene = ReplayScene.CurrentScene;

    I modified it to the following and it solved it:
    recordScene = ReplayScene.FromCurrentScene();
     
    scottyboy805 likes this.
  10. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,169
    Ok good to hear and thanks for letting me know.
    I think we will probably make the `CurrentScene` property obsolete in the next update and use `FromCurrentScene` instead since we have had some other issues relating to using a cached replay scene in the past.
    Let me know if there is anything else in the meantime.