-
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IMPORTANT: this update requires you to delete your FishNet folder when importing from GitHub!! - Fixed NetworkAnimatorEditor not properly displaying parameters for AnimatorOverrideControllers. - Improved TimeManager.Tick is now set on clients during the authentication process. - Improved TimeManager readability. - Improved description of several codegen warnings. - Improved TimeManager.RoundTripTime accuracy. - Added TargetRpc and ObserversRpc attributes can be used on the same method. - Added NetworkManager.SpawnPacking, to control transform compression during spawns. - Added NetworkTransform.Packing, to control transform compression during updates. - Fixed automatic code stripping not working on some Unity versions. - Improved OnStartServer/Network no longer calls before active scene is set during a scene load. - Fixed IEnumerator Awake codegen errors when inheritance involved multiple assemblies. - Fixed Server and Client attribute methods not logging when NetworkBehaviour was not initialized.
- Loading branch information
FirstGearGames
committed
Apr 11, 2022
1 parent
78c1e36
commit 3f7f315
Showing
58 changed files
with
1,619 additions
and
828 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
68 changes: 68 additions & 0 deletions
68
Assets/FishNet/CodeGenerating/Processing/Rpc/AttributeData.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
using FishNet.CodeGenerating.Helping; | ||
using FishNet.Object.Helping; | ||
using MonoFN.Cecil; | ||
using System.Collections.Generic; | ||
|
||
namespace FishNet.CodeGenerating.Processing.Rpc | ||
{ | ||
internal static class AttributeDataExtensions | ||
{ | ||
|
||
/// <summary> | ||
/// Returns RpcTypes in datas. | ||
/// </summary> | ||
public static List<RpcType> GetRpcTypes(this List<AttributeData> datas) | ||
{ | ||
//RpcTypes for originalMd. | ||
List<RpcType> rpcTypes = new List<RpcType>(); | ||
foreach (AttributeData ad in datas) | ||
rpcTypes.Add(ad.RpcType); | ||
|
||
return rpcTypes; | ||
} | ||
|
||
/// <summary> | ||
/// Gets CustomAttribute for rpcType | ||
/// </summary> | ||
public static CustomAttribute GetAttribute(this List<AttributeData> datas, RpcType rpcType) | ||
{ | ||
for (int i = 0; i < datas.Count; i++) | ||
{ | ||
if (datas[i].RpcType == rpcType) | ||
return datas[i].Attribute; | ||
} | ||
|
||
CodegenSession.LogError($"RpcType {rpcType} not found in datas."); | ||
return null; | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Returns RpcType as flag through combining datas. | ||
/// </summary> | ||
/// <param name="datas"></param> | ||
/// <returns></returns> | ||
public static RpcType GetCombinedRpcType(this List<AttributeData> datas) | ||
{ | ||
RpcType result = RpcType.None; | ||
for (int i = 0; i < datas.Count; i++) | ||
result |= datas[i].RpcType; | ||
|
||
return result; | ||
} | ||
} | ||
|
||
internal class AttributeData | ||
{ | ||
public readonly CustomAttribute Attribute; | ||
public readonly RpcType RpcType; | ||
|
||
public AttributeData(CustomAttribute attribute, RpcType rpcType) | ||
{ | ||
Attribute = attribute; | ||
RpcType = rpcType; | ||
} | ||
|
||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...ng/Timing/SimulationSyncBroadcast.cs.meta → ...ting/Processing/Rpc/AttributeData.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.