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

refactor: simplified interest management #990

Draft
wants to merge 56 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b7d40e9
interest management bench tests implemented.
dragonslaya84 Nov 7, 2021
8fd5930
simplified aoi system. This is intital start of simplifying. I have g…
dragonslaya84 Nov 7, 2021
2dc52b8
null check fix.
dragonslaya84 Nov 7, 2021
4c67bee
more fixes to get tests to pass.
dragonslaya84 Nov 7, 2021
7322f46
fixing all prefabs with new scene checker and proximity scripts.
dragonslaya84 Nov 8, 2021
6312152
fix for lower version of cli unity.
dragonslaya84 Nov 8, 2021
8035029
more fixes for test's passing. Will fix scene checker tests later on.
dragonslaya84 Nov 8, 2021
a8e710c
proximity checker now fully works.
dragonslaya84 Nov 8, 2021
ae7f26c
improvements to core interest management system.
dragonslaya84 Nov 8, 2021
a06baef
more improvements to core of aoi. Now the system register's single ao…
dragonslaya84 Nov 10, 2021
abd394b
setup performance base to do proximity test alone now and fixed some …
dragonslaya84 Nov 10, 2021
5084838
some clean up.
dragonslaya84 Nov 10, 2021
acdf561
fix for non 2021.2 versions
dragonslaya84 Nov 10, 2021
1d24684
fix for causing removal of players from server list.
dragonslaya84 Nov 11, 2021
75773e9
removed match checker
dragonslaya84 Nov 12, 2021
c292a66
fixed issues with comparer check for registering new visibility systems.
dragonslaya84 Nov 12, 2021
bf51366
fix for opening up prefabs.
dragonslaya84 Nov 12, 2021
9248f20
pushing new default global system script so if end users want to have…
dragonslaya84 Nov 12, 2021
8a94b68
lowering the benchmark to 500 objects and 50 clients.
dragonslaya84 Nov 12, 2021
f44edbd
fixed up global system better. Made it so u dont need script now.
dragonslaya84 Nov 12, 2021
070f859
added lymdun suggestion use linq for finding list.
dragonslaya84 Nov 13, 2021
0527155
renamed somethings better
dragonslaya84 Nov 15, 2021
9d57d5d
fixing check
dragonslaya84 Nov 15, 2021
f817b6f
placed ignore setting for now on tests.
dragonslaya84 Nov 15, 2021
1450d7f
fix example.
dragonslaya84 Nov 15, 2021
dba2e1d
new script to do performance testing for global system only.
dragonslaya84 Nov 15, 2021
f17a202
improving test:
James-Frowen Nov 15, 2021
534a064
adding namespace to test
James-Frowen Nov 15, 2021
8efd797
test: removing multiclient component
James-Frowen Nov 15, 2021
256b4aa
lowering count to check it works
James-Frowen Nov 15, 2021
0a24a5a
moving set up before starting server
James-Frowen Nov 15, 2021
06ac691
fix: using OnStartServer for RegisterObject
James-Frowen Nov 15, 2021
36e6e48
rename: NetworkVisibility
James-Frowen Nov 15, 2021
fcdae19
rename: renaming visibilitySystemData
James-Frowen Nov 15, 2021
3b99788
style: moving Comparer to struct it is for
James-Frowen Nov 15, 2021
a46acd0
removing VisibilitySystemData
James-Frowen Nov 15, 2021
8ee2fd8
adding todo
James-Frowen Nov 15, 2021
66b1173
deleting VisibilitySystemData
James-Frowen Nov 15, 2021
7fa8251
throwing if object manager is null
James-Frowen Nov 15, 2021
da94d9f
creating settings once, and then settingsa values in OnStartServer
James-Frowen Nov 15, 2021
a650f83
rename CheckForObservers to Rebuild
James-Frowen Nov 15, 2021
6f40e06
renaming BaseVisibilityInspector
James-Frowen Nov 15, 2021
acb9ac7
remaing Initialize to CreateSystem
James-Frowen Nov 15, 2021
97455b0
deleting Interface
James-Frowen Nov 15, 2021
46e7dc0
making RegisterObject take the Network Identity
James-Frowen Nov 15, 2021
cdc9372
renaming rebuild methods
James-Frowen Nov 15, 2021
eb925de
fixing ServerObjectMamager
James-Frowen Nov 15, 2021
9eee2e8
removing SceneSettings
James-Frowen Nov 15, 2021
0bd0835
making ProximitySettings a struct
James-Frowen Nov 15, 2021
ddf3861
changing when system is created
James-Frowen Nov 15, 2021
79900a1
fixing startup order, key changes in comment
James-Frowen Nov 16, 2021
740f00f
Adding Server reference to Factories
James-Frowen Nov 16, 2021
c8f181d
test: adding helper methods to ensure things are added/destroyed corr…
James-Frowen Nov 16, 2021
5f1fae0
fixing helper methods
James-Frowen Nov 16, 2021
aeb08ba
test: fixing test helper methods, adding asserts for system not found
James-Frowen Nov 16, 2021
037b5b0
test: moving debug logs to its own test method
James-Frowen Nov 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 0 additions & 137 deletions Assets/Mirage/Components/NetworkMatchChecker.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/Mirage/Components/NetworkMatchChecker.cs.meta

This file was deleted.

102 changes: 0 additions & 102 deletions Assets/Mirage/Components/NetworkProximityChecker.cs

This file was deleted.

8 changes: 8 additions & 0 deletions Assets/Mirage/Components/Visibility/Inspectors.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Mirage.InterestManagement;
using UnityEngine;

namespace Mirage.Components
{
[DisallowMultipleComponent]
public class DistanceVisibilityFactory : VisibilitySystemFactory
{
/// <summary>
/// How often (in seconds) that this object should update the list of observers that can see it.
/// </summary>
[Tooltip("How often (in seconds) that this object should update the list of observers that can see it.")]
public float VisibilityUpdateInterval = 1;

protected override VisibilitySystem CreateSystem(ServerObjectManager serverObjectManager)
{
return new DistanceVisibilitySystem(serverObjectManager, VisibilityUpdateInterval);
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Mirage.InterestManagement;
using UnityEngine;

namespace Mirage.Components
{
[DisallowMultipleComponent]
public class SceneVisibilityFactory : VisibilitySystemFactory
{
protected override VisibilitySystem CreateSystem(ServerObjectManager serverObjectManager)
{
return new SceneVisibilitySystem(serverObjectManager);
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Mirage.InterestManagement;
using UnityEngine;

namespace Mirage.Components
{
public abstract class VisibilitySystemFactory : MonoBehaviour
{
public NetworkServer Server;
public VisibilitySystem System { get; private set; }

private void Awake()
{
System = CreateSystem(Server.GetComponent<ServerObjectManager>());
}
private void OnDestroy()
{
System?.ShutDown();
System = null;
}

/// <summary>
/// Do initialization of data inside of here.
/// </summary>
protected abstract VisibilitySystem CreateSystem(ServerObjectManager serverObjectManager);
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Mirage/Components/Visibility/Proximity.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading