Skip to content

Commit 59fc5fc

Browse files
committed
Initial commit
0 parents  commit 59fc5fc

File tree

1,248 files changed

+130007
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,248 files changed

+130007
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# This .gitignore file should be placed at the root of your Unity project directory
2+
#
3+
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
4+
#
5+
/[Ll]ibrary/
6+
/[Tt]emp/
7+
/[Oo]bj/
8+
/[Bb]uild/
9+
/[Bb]uilds/
10+
/[Ll]ogs/
11+
/[Uu]ser[Ss]ettings/
12+
13+
# MemoryCaptures can get excessive in size.
14+
# They also could contain extremely sensitive data
15+
/[Mm]emoryCaptures/
16+
17+
# Recordings can get excessive in size
18+
/[Rr]ecordings/
19+
20+
# Uncomment this line if you wish to ignore the asset store tools plugin
21+
# /[Aa]ssets/AssetStoreTools*
22+
23+
# Autogenerated Jetbrains Rider plugin
24+
/[Aa]ssets/Plugins/Editor/JetBrains*
25+
26+
# Visual Studio cache directory
27+
.vs/
28+
29+
# Gradle cache directory
30+
.gradle/
31+
32+
# Autogenerated VS/MD/Consulo solution and project files
33+
ExportedObj/
34+
.consulo/
35+
*.csproj
36+
*.unityproj
37+
*.sln
38+
*.suo
39+
*.tmp
40+
*.user
41+
*.userprefs
42+
*.pidb
43+
*.booproj
44+
*.svd
45+
*.pdb
46+
*.mdb
47+
*.opendb
48+
*.VC.db
49+
50+
# Unity3D generated meta files
51+
*.pidb.meta
52+
*.pdb.meta
53+
*.mdb.meta
54+
55+
# Unity3D generated file on crash reports
56+
sysinfo.txt
57+
58+
# Builds
59+
*.apk
60+
*.aab
61+
*.unitypackage
62+
*.app
63+
64+
# Crashlytics generated file
65+
crashlytics-build.properties
66+
67+
# Packed Addressables
68+
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
69+
70+
# Temporary auto-generated Android Assets
71+
/[Aa]ssets/[Ss]treamingAssets/aa.meta
72+
/[Aa]ssets/[Ss]treamingAssets/aa/*

.vsconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"version": "1.0",
3+
"components": [
4+
"Microsoft.VisualStudio.Workload.ManagedGame"
5+
]
6+
}

Assets/FishNet.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/FishNet/CodeGenerating.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
After updating a custom Cecil to fix conflict with Unity.Burst in 2021 perform the following:
2+
3+
- Open cecil in it's own project; eg: do not place directly in FN.
4+
- Rename namespace.Mono to namespace.MonoFN.
5+
- Current project rename strings, "Mono to "MonoFN
6+
- Replace current project #if INSIDE_ROCKS to #if UNITY_EDITOR
7+
- Comment out `[assembly: AssemblyTitle ("MonoFN.Cecil.Rocks")]` within rocks\Mono.Cecil.Rocks\AssemblyInfo.cs.
8+
- Delete obj/bin/tests folders.
9+
- Copy into FN project.

Assets/FishNet/CodeGenerating/FN_README.txt.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/FishNet/CodeGenerating/Helpers.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
using FishNet.CodeGenerating.Helping.Extension;
2+
using FishNet.Object;
3+
using FishNet.Object.Helping;
4+
using FishNet.Object.Prediction;
5+
using FishNet.Object.Synchronizing;
6+
using MonoFN.Cecil;
7+
8+
9+
namespace FishNet.CodeGenerating.Helping
10+
{
11+
public class AttributeHelper
12+
{
13+
#region Reflection references.
14+
internal string ReplicateAttribute_FullName;
15+
internal string ReconcileAttribute_FullName;
16+
private string ServerAttribute_FullName;
17+
private string ClientAttribute_FullName;
18+
private string ServerRpcAttribute_FullName;
19+
private string ObserversRpcAttribute_FullName;
20+
private string TargetRpcAttribute_FullName;
21+
private string SyncVarAttribute_FullName;
22+
private string SyncObjectAttribute_FullName;
23+
#endregion
24+
25+
internal bool ImportReferences()
26+
{
27+
ServerAttribute_FullName = typeof(ServerAttribute).FullName;
28+
ClientAttribute_FullName = typeof(ClientAttribute).FullName;
29+
ServerRpcAttribute_FullName = typeof(ServerRpcAttribute).FullName;
30+
ObserversRpcAttribute_FullName = typeof(ObserversRpcAttribute).FullName;
31+
TargetRpcAttribute_FullName = typeof(TargetRpcAttribute).FullName;
32+
SyncVarAttribute_FullName = typeof(SyncVarAttribute).FullName;
33+
SyncObjectAttribute_FullName = typeof(SyncObjectAttribute).FullName;
34+
ReplicateAttribute_FullName = typeof(ReplicateAttribute).FullName;
35+
ReconcileAttribute_FullName = typeof(ReconcileAttribute).FullName;
36+
37+
return true;
38+
}
39+
40+
/// <summary>
41+
/// Returns type of Rpc attributeFullName is for.
42+
/// </summary>
43+
/// <param name="attributeFullName"></param>
44+
/// <returns></returns>
45+
public RpcType GetRpcAttributeType(CustomAttribute ca)
46+
{
47+
if (ca.Is(ServerRpcAttribute_FullName))
48+
return RpcType.Server;
49+
else if (ca.Is(ObserversRpcAttribute_FullName))
50+
return RpcType.Observers;
51+
else if (ca.Is(TargetRpcAttribute_FullName))
52+
return RpcType.Target;
53+
else
54+
return RpcType.None;
55+
}
56+
57+
58+
/// <summary>
59+
/// Returns type of Rpc attributeFullName is for.
60+
/// </summary>
61+
/// <param name="attributeFullName"></param>
62+
/// <returns></returns>
63+
internal QolAttributeType GetQolAttributeType(string attributeFullName)
64+
{
65+
if (attributeFullName == ServerAttribute_FullName)
66+
return QolAttributeType.Server;
67+
else if (attributeFullName == ClientAttribute_FullName)
68+
return QolAttributeType.Client;
69+
else
70+
return QolAttributeType.None;
71+
}
72+
73+
74+
/// <summary>
75+
/// Returns if attribute if a SyncVarAttribute.
76+
/// </summary>
77+
/// <param name="attributeFullName"></param>
78+
/// <returns></returns>
79+
public bool IsSyncVarAttribute(string attributeFullName)
80+
{
81+
return (attributeFullName == SyncVarAttribute_FullName);
82+
}
83+
/// <summary>
84+
/// Returns if attribute if a SyncObjectAttribute.
85+
/// </summary>
86+
/// <param name="attributeFullName"></param>
87+
/// <returns></returns>
88+
public bool IsSyncObjectAttribute(string attributeFullName)
89+
{
90+
return (attributeFullName == SyncObjectAttribute_FullName);
91+
}
92+
}
93+
94+
}

Assets/FishNet/CodeGenerating/Helpers/AttributeHelper.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)