fishnet installed

This commit is contained in:
2023-05-31 11:32:21 -04:00
parent 47b25269f1
commit a001fe1b04
1291 changed files with 126631 additions and 1 deletions

View File

@ -0,0 +1,34 @@
using FishNet.Connection;
using UnityEngine.SceneManagement;
namespace FishNet.Managing.Scened
{
/// <summary>
/// Data container about a scene presence change for a client.
/// </summary>
public struct ClientPresenceChangeEventArgs
{
/// <summary>
/// Scene on the server which the client's presence has changed.
/// </summary>
public Scene Scene;
/// <summary>
/// Connection to client.
/// </summary>
public NetworkConnection Connection;
/// <summary>
/// True if the client was added to the scene, false is removed.
/// </summary>
public bool Added;
internal ClientPresenceChangeEventArgs(Scene scene, NetworkConnection conn, bool added)
{
Scene = scene;
Connection = conn;
Added = added;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fa91039d4ab1c6445af72881af122b0a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,78 @@
using System.Collections.Generic;
using UnityEngine.SceneManagement;
namespace FishNet.Managing.Scened
{
/// <summary>
/// Data container about a scene load start.
/// </summary>
public struct SceneLoadStartEventArgs
{
/// <summary>
/// Queue data used by the current scene action.
/// </summary>
public readonly LoadQueueData QueueData;
internal SceneLoadStartEventArgs(LoadQueueData lqd)
{
QueueData = lqd;
}
}
/// <summary>
/// Data container about a scene load percent change.
/// </summary>
public struct SceneLoadPercentEventArgs
{
/// <summary>
/// Queue data used by the current scene action.
/// </summary>
public readonly LoadQueueData QueueData;
/// <summary>
/// Percentage of change completion. 1f is equal to 100% complete.
/// </summary>
public readonly float Percent;
internal SceneLoadPercentEventArgs(LoadQueueData lqd, float percent)
{
QueueData = lqd;
Percent = percent;
}
}
/// <summary>
/// Data container about a scene load end.
/// </summary>
public struct SceneLoadEndEventArgs
{
/// <summary>
/// Queue data used by the current scene action.
/// </summary>
public readonly LoadQueueData QueueData;
/// <summary>
/// Scenes which were loaded.
/// </summary>
public readonly Scene[] LoadedScenes;
/// <summary>
/// Scenes which were skipped because they were already loaded.
/// </summary>
public readonly string[] SkippedSceneNames;
/// <summary>
/// Scenes which were unloaded.
/// </summary>
public readonly string[] UnloadedSceneNames;
internal SceneLoadEndEventArgs(LoadQueueData lqd, string[] skipped, Scene[] loaded, string[] unloadedSceneNames)
{
QueueData = lqd;
SkippedSceneNames = skipped;
LoadedScenes = loaded;
UnloadedSceneNames = unloadedSceneNames;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 86278568f8087de49b0908f148501993
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,74 @@
using System;
using System.Collections.Generic;
using UnityEngine.SceneManagement;
namespace FishNet.Managing.Scened
{
/// <summary>
/// Data container about a scene unload start.
/// </summary>
public struct SceneUnloadStartEventArgs
{
/// <summary>
/// Queue data used by the current scene action.
/// </summary>
public readonly UnloadQueueData QueueData;
internal SceneUnloadStartEventArgs(UnloadQueueData sqd)
{
QueueData = sqd;
}
}
/// <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>
/// Handles of scenes which were successfully unloaded.
/// </summary>
[Obsolete("Use UnloadedScenesV2")]
public int[] UnloadedSceneHandles;
/// <summary>
/// Names of scenes which were successfully unloaded.
/// </summary>
[Obsolete("Use UnloadedScenesV2")]
public string[] UnloadedSceneNames;
/// <summary>
/// Scenes which were successfully unloaded.
/// This collection may be populated with empty scenes depending on engine version.
/// </summary>
public List<Scene> UnloadedScenes;
/// <summary>
/// Unloaded scenes with names and handles cached.
/// This will be renamed as UnloadedScenes in Fish-Networking version 4.
/// </summary>
public List<UnloadedScene> UnloadedScenesV2;
internal SceneUnloadEndEventArgs(UnloadQueueData sqd, List<Scene> unloadedScenes, List<UnloadedScene> newUnloadedScenes)
{
QueueData = sqd;
UnloadedScenes = unloadedScenes;
UnloadedScenesV2 = newUnloadedScenes;
#pragma warning disable CS0618 // Type or member is obsolete
UnloadedSceneNames = new string[newUnloadedScenes.Count];
UnloadedSceneHandles = new int[newUnloadedScenes.Count];
for (int i = 0; i < newUnloadedScenes.Count; i++)
{
UnloadedSceneNames[i] = newUnloadedScenes[i].Name;
UnloadedSceneHandles[i] = newUnloadedScenes[i].Handle;
}
#pragma warning restore CS0618
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2c24765fea85b564aa331b529f324f92
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: