Fix using Ray parameter in Network RPC
This commit is contained in:
@@ -407,6 +407,23 @@ namespace FlaxEngine.Networking
|
||||
return new Quaternion(ReadSingle(), ReadSingle(), ReadSingle(), ReadSingle());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes data of type <see cref="Ray"/> into the message.
|
||||
/// </summary>
|
||||
public void WriteRay(Ray value)
|
||||
{
|
||||
WriteVector3(value.Position);
|
||||
WriteVector3(value.Direction);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads and returns data of type <see cref="Ray"/> from the message.
|
||||
/// </summary>
|
||||
public Ray ReadRay()
|
||||
{
|
||||
return new Ray(ReadVector3(), ReadVector3());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes data of type <see cref="Boolean"/> into the message.
|
||||
/// </summary>
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace Flax.Build.Plugins
|
||||
{ "FlaxEngine.Float3", new InBuildSerializer("WriteFloat3", "ReadFloat3") },
|
||||
{ "FlaxEngine.Float4", new InBuildSerializer("WriteFloat4", "ReadFloat4") },
|
||||
{ "FlaxEngine.Quaternion", new InBuildSerializer("WriteQuaternion", "ReadQuaternion") },
|
||||
{ "FlaxEngine.Ray", new InBuildSerializer("WriteRay", "ReadRay") },
|
||||
};
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -471,7 +472,7 @@ namespace Flax.Build.Plugins
|
||||
if (string.Equals(binaryModule.Key, "FlaxEngine", StringComparison.Ordinal))
|
||||
return;
|
||||
|
||||
// Skip assemblies not using netowrking
|
||||
// Skip assemblies not using networking
|
||||
if (!binaryModule.Any(module => module.Tags.ContainsKey(Network)))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user