Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression of issue #270: SceneUnloadEndEventArgs doesn't contain unloaded scenes names #783

Closed
FREEZX opened this issue Sep 26, 2024 · 1 comment
Labels
Added! This feature has been added! Resolved Pending Release

Comments

@FREEZX
Copy link
Contributor

FREEZX commented Sep 26, 2024

General
Unity version: 2022.3.23
Fish-Networking version:
Discord link: N/A

Description
The UnloadedScenesV2 / UnloadedScenes is not present in new versions of FishNet yet, and the SceneUnloadEndEventArgs has it as an unused property.

@FirstGearGames
Copy link
Owner

    /// <summary>
    /// Data container about a scene unload end.
    /// </summary>
    public struct SceneUnloadEndEventArgs
    {
        /// <summary>
        /// Queue data used by the current scene action.
        /// </summary>
        public readonly UnloadQueueData QueueData;
        /// <summary>
        /// Scenes which were successfully unloaded.
        /// This collection may be populated with empty scenes depending on engine version.
        /// </summary>
        [Obsolete("Use UnloadedScenesV2.")] //Remove on V5. Rename UnloadedScenesV2 to UnloadedScenes.
        public List<Scene> UnloadedScenes;
        /// <summary>
        /// Scenes which were successfully unloaded.
        /// This contains information of the scene unloaded but may not contain scene references as some Unity versions discard that information after a scene is unloaded.
        /// </summary>
        public List<UnloadedScene> UnloadedScenesV2;
        
        internal SceneUnloadEndEventArgs(UnloadQueueData sqd, List<Scene> unloadedScenes, List<UnloadedScene> newUnloadedScenes)
        {
            QueueData = sqd;
#pragma warning disable CS0618 // Type or member is obsolete
            UnloadedScenes = unloadedScenes;
#pragma warning restore CS0618 // Type or member is obsolete
            UnloadedScenesV2 = newUnloadedScenes;
        }
    }

Please try that.

@FirstGearGames FirstGearGames added Added! This feature has been added! Resolved Pending Release labels Sep 26, 2024
FirstGearGames pushed a commit that referenced this issue Sep 26, 2024
- Added several PreciseTick operators.
- Added PreciseTick.Add/Subtract extensions.
- Added PreciseTick.IsValid();
- Added TimeManager.TimeToPreciseTick.
- Improved NetworkConnection.Kick sanity checks when trying to kick invalid connections.
- Fixed SyncVar (Beta) not sending updates to reference times after calling DirtyAll, when the SyncVar was initialized in Awake and not changed aftwards.
- Improved SyncVar write performance slightly.
- Added UnloadSceneEventArgs.UnloadedScenesV2 to resolve issue (#783).
- Fixed "cannot have it's parent changed" warning when spawning objects with nested NetworkObjects.
- Fixed PrefabId 65535 is out of range error when spawning nested NetworkObjects which were not prefabs (#778).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added! This feature has been added! Resolved Pending Release
Projects
None yet
Development

No branches or pull requests

2 participants