Assemblies & Namespaces
Xxx = The Service name
|AwSim.Xxx||The package runtime assembly|
|AwSim.Xxx.Editor||The package editor assembly|
|AwSim.Xxx.Tests||The package runtime EditMode tests|
|AwSim.Xxx.Tests.PlayMode||The package runtime PlayMode tests|
|AwSim.Xxx.Editor.Tests||The package editor EditMode tests|
|AwSim.Xxx.Editor.Tests.PlayMode||The package editor PlayMode tests|
Both assemblies and namespaces follow the same convension.
Note the capital letter "A" and "S" in "AwSim". The reason for this format is that
- "AWSim" could read incorrectly as "AWS im",
- "Awsim" could read incorrectly as "A swim",
- "awSIM" is also incorrect, because the "A" and "W" are acronyms for "Adaptive World" and "Sim" is an abbreviation for "Simulator" so it also does not make sense to write them all three in upper case.
Although the offical human name is "Aw-Sim", the assembly, package or namespaces contains no hyphens or underscores because namespaces & package names do not allow hyphens and domain names do not allow underscores. Unfortunately the awsim.com domain was already registred so the aw-sim.com was registered instead which reads better anyways and conforms with the official human name.
Package names needs to conform to Unity's Package manifest. So in that case it will be:
i.e. same as the assembly name or namespace but in lower case.
- Classes, interfaces, methods, properties start with a Capital letter in CamelCase.
- Fields, constants and variables starts with a small letter also in camelCase.
- Interfaces are prefixed with an "I" for example
- Preprocessors are prefixed with "AWSIM_XXX_" where XXX is the name of the Service and is written in UPPER_CASE. For example
The following methods are located in different classes, but share the same common purpose.
|Execute...||Executes a remote message.|
|Persist...||Persist the entire object to the writer with the purpose that it can be Restore() again in the future in the same state.|
|Publish...||Sends a message associated with a Plan to all remotes.|
|Read...||Read data from a stream|
|Receive...||Receive a remote message associated with a Plan.|
|RegisterPlans||Register all potential Plan that could be received in a central registry.|
|Restore...||Restore the entire object based on the read instructions.|
|Schedule||Schedules a remote message to Execute at a potential later time.|
|Send...||Sends a message associated with a Plan to a single remote.|
|SetUp||Set up (a.k.a. "initialize") an object's internal state / register for events if necessary / provide helper objects.|
|Synchronize...||Execute all the expired scheduled Plans.|
|TearDown||Releases an object's internal state / unregister events / destroy helper objects.|
|Write...||Write data to a stream.|
GameObject Names (instances)
It is recommended to stick to the asset names and to apply the same standards. This helps to link an instance with the original asset or determine where credit is due. However you may also optionally choose a shorter or more descriptive name where it make sense to do so.
Refer to the Modular Prefabs section.