-
Notifications
You must be signed in to change notification settings - Fork 0
📃Pipeline
-
General
-
Must comply with all agreed upon Conventions.
-
Developers (Everything is checked by the lead or someone appointed by the lead)
- Every mechanic & feature must be free of bugs and unnecessary warnings.
- There should be no leaks to improve performance. For example destroy Unity objects that are not used.
- Use “Debug.Logs” during development and remove after implementation.
- Code must comply with the agreed code convention. Must be implemented with all other mechanics or features without any errors or unnecessary warnings.
-
Artists (Everything is checked by the lead or someone appointed by the lead)
- Must follow current StyleGuide.
- Must meet polygon count requirements.
- Must be a textured model.
- Must be free of N-Gons
- There must be one prefab per model.
- A model has to have a hitbox in the prefab. And if it has to have a physics simulation, it needs to have a rigidbody
- The model needs to contain a animation for every action it has to do. If it needs to have animations.
- Must be the correct format adn resolution. as agreed upon in pipeline(UI)
- If the buttons have both an idle and an active version.(UI)
- A animations is done when it has been checked and approved by a lead(Animation)
General conventions
Code lines are not allowed to exceed 120 characters so that code wil always be readable on most screen sizes. All functions are to have 1 blank space between each other.
Namespaces
The namespace name is written in UpperCamelCase. Every class needs to be inside of a namespace.
namespace ExampleNamespace
{
public class ExampleScript : MonoBehaviour
{
}
}Code seperation
To seperate code between private, public and functions we a sperator. If there are no for example private's we dont use a seperator for it.
//-------------------Private-------------------//
private int _exampleInt;
//-------------------Public-------------------//
public int ExampleInt
{
get => _exampleInt;
set => _exampleInt = value;
}
//-------------------Functions-------------------//
public void ExampleFunction
{
}Classes
The Class name is written in UpperCamelCase.
public class ExampleScript : MonoBehaviour
{
}Functions
The Function name is written in UpperCamelCase.
private void ExampleFunction()
{
}Public functions require a summary including the parameters and returns.
/// <summary>
/// Function description.
/// </summary>
/// <param name="parameter">Parameter value to pass.</param>
/// <returns>What the function return.</returns>
public int ExampleFunction(string parameter)
{
Return 0;
}When there is only 1 line of code inside of an function you can use a lambda expresion.
public void ExampleFunction() => SecondExampleFunction();Variables
Private variable names always start with an '_' (Even when serialized) after which it is written in lowerCamelCase.
private Object _variableExample;
[SerializeField]
private Object _secondVariableExample;Public variable names are written in lowerCamelCase.
public Object variableExample;Constant variable names are written in FULL_CAPITALS
public const VARIABLE_EXAMPLETemporary variables inside of an function always need to be in lowerCamelCase
private void ExampleFunction()
{
float floatExample = 1f;
int intExample = 1;
}Temporary constants inside of an function always need to be written out and are written in FULL_CAPITALS.
private void ExampleFunction()
{
const float FLOAT_EXAMPLE = 1f;
const int INT_EXAMPLE = 1;
}Lists are written the same as public or private variables and are always assigned in using '= new()'.
private List<GameObject> _exampleList = new();Propertie names are written in UpperCamelCase and if they are 1 line use lambda expression. if the propertie has a if statement it doesnt use lambda it uses a scope
public int ExampleInteger
{
get => _exampleInterger;
set => _exampleInterger = value;
}
public int ExampleInterger
{
get => _exampleInterger;
set{
if(value < 0)
_exampleInterger = 0;
}
}If statements
When there is only 1 line of code after an if statement it needs to be tabbed under the if statement and does not need brackets and same with the else.
if(_exampleBoolean)
ExampleFunction();
else
SeccondExampleFunction();
if(!_exampleBoolean)
ThirdExampleFunction();If either the if or the else in the statement contains multiple lines of code both the if and the else need brackets.
if(_exampleBoolean)
{
ExampleFunction();
}
else
{
SeccondExampleFunction();
ThirdExampleFunction();
}For loops
For loops are written using the same rules as if statements, When there is only 1 line inside of it it can be written without brackets.
for (int i = 0; i < _exampleList.Count; i++)
ExampleFunction(_exampleList[i]);
for (int i = 0; i < _exampleList.Count; i++)
{
ExampleFunction(_exampleList[i]);
SecondExampleFunction(_exampleList[i]);
}For Each are written using the same rules as for loops.
foreach(GameObject gameObject in ExampleList)
ExampleFunction(gameObject);
foreach(GameObject gameObject in ExampleList)
{
ExampleFunction(gameObject);
SecondExampleFunction(gameObject);
}Events
The Unity event / Action name is written in UpperCamerCase and wil almost always start with 'On'.
public UnityEvent OnExampleEvent;
public Action OnSecondExampleEvent; Structs
The struct name is written in UpperCamelCase and everything inside the struct follows the usual code conventions.
public struct ExampleStruct
{
public double x;
public double y;
}Enums
The enum name is written in UpperCamelCase while the constants are in FULL_CAPITALS.
enum ExampleEnum
{
FIRST_CONSTANT,
SECOND_CONSTANT
}For every asset except some exeptions<, we use a prefix Every asset name needs to be in UpperCamelCase. Every prefix needs to be as short as possible, when this will result in the same prefix for 2 asset types. We will add a extra letter to the prefix, to not contradict other names
-
TextureBaseColor = TB_
-
TextureNormalMap = TN_
-
TextureMaskMap = TM_
-
TextureAmbiantOcclusion = TA_
-
Material = MA_
-
Model = M_
-
Shader = S_
-
Animation = A_
-
Prefab = P_
-
ScriptableObject = SO_
-
Audio = AU_
-
Sprite = SP_
-
SpriteSheet = SPS_
-
Exeptions<: Scripts, because for scripts we use UpperCamelCase.
Folder naming: Always start a folder name with a capital letter, and use UpperCamelCase. A main folder needs to have a clear name about the asset type that contains it. We use subfolders to divide work per feature, we do this for a organized asset folder. The subfolders name needs to be a clear representatie of the feature that contains it.
Scene Naming: For every feature/bugfix/model/setup we use a new scene. For the naming of the scene we use the same naming of the branch but in UpperCamelCase. Because "/" doesnt work in the Unity Scene naming we use "-"
- Unity: 2022.3.19f1
- IDE: free of choice
- Blender
- Maya
- Substance Painter
- Photoshop
- Models: format: .fbx, Polycount: robot: 20.000, dwarf: 10.000, environment: 20.000, workstations: 10.000, props: 2.000, pivot center of the model, scale: scale of model is based on scale of blockedout scene and models in unity, No N-Gons: because N-Gons mess up topology and thereby mess up textures.
- Textures: Format: .PNG, Resolution: 2048x2048
- Animations: The animations are compacted in one big animationclip. Animations for individual asset need to be sorted out from that clip(for example: frame 60 > frame 70 is animation Walking)
- Audio: Format: .wav, Copyright free
- Sprites: Format: .PNG, Resolution: 1080x1080
- Documents are mainly shared by any available program. Examples are Discord and MicrosoftTeams. Files used for inGame use(models, textures, etc) are shared by Pull Requests in GitHub to directly implement these files into the project. To read more about sharing on GitHub See GitFlow
- For digital communicating we use the fastest program at that time. Examples are Discord, Microsoft Teams, Whatsapp
- Here you can find our Trello-Board to see the progress and future features.
