public sealed class NetworkRulesAssetA network policy as a file: what a .vxnetrules holds.
Remarks
[16 § Rules](../../../docs/plan/16-networking.md) makes the policy a declaration rather than a switch, and this is the declaration on disk. A co-operative game and a competitive shooter want different answers to every question in NetworkRules; with a file, relaxing server authority is an explicit, reviewable decision somebody wrote down and a reviewer can read in a diff.
⚠ Here rather than in Vixen.Net, beside NetworkObject and for exactly its reason. The reference to this asset is a component a prefab carries, and what a compiled scene may name is a component with [Component] and [DataContract] — which Vixen.Net cannot produce, because it may not reference Vixen.Engine and so runs neither generator. The asset lives beside the reference so that one assembly answers for both halves.
⚠ A wrapper around NetworkRules rather than the rules themselves, and the wrapper is what carries the name. A prefab names this asset by name — see NetworkRulesReference for why a name and not a handle — so the file has to hold one, and a bare policy has nowhere to put it. The same shape, and the same argument, as WaterWavesAsset around a spectrum.
Fields and properties (3)
public const string ExtensionWhat a policy file is called on disk.
public string NameWhat it is called, which is what a prefab names it by.
public NetworkRules RulesThe policy itself.
Methods (1)
public string? Validate()Why this policy cannot mean what it says, or if it can.
Used by (7)
- NetworkRulesContentVixen.Net.Engine.Content
- NetworkRulesContentTestsVixen.Net.Engine.Content.Tests
- ShippedVixen.Net.Engine.Content.Tests
- TypeRegistrationVixen.Net.Engine
- Vixen_Net_Engine_NetworkRulesAssetSerializerVixen.Net.Engine
- NetworkRulesImporterVixen.Editor.Assets
- NetworkRulesImporterTestsVixen.Editor.Assets.Tests