Netcode Version 0.6:
I try to follow the documentation to modify the default values of translation and rotation of ghost prefabs:
- Created a class which implements IGhostDefaultOverridesModifier
code
public class NetcodeOverwrites : IGhostDefaultOverridesModifier
{
public void Modify(Dictionary<string, GhostComponentModifier> overrides)
{
var transOverwrite = new GhostComponentModifier
{
typeFullName = "Unity.Transforms.Translation",
attribute = new GhostComponentAttribute{PrefabType = GhostPrefabType.All, OwnerPredictedSendType = GhostSendType.All, SendDataForChildEntity = false},
fields = new[]
{
new GhostFieldModifier
{
name = "Value",
attribute = new GhostFieldAttribute{Quantization = 10000, Smoothing=SmoothingAction.InterpolateAndExtrapolate}
}
},
entityIndex = 0
};
overrides.Add(transOverwrite.typeFullName, transOverwrite);
var rotOverwrite = new GhostComponentModifier
{
typeFullName = "Unity.Transforms.Rotation",
attribute = new GhostComponentAttribute{PrefabType = GhostPrefabType.All, OwnerPredictedSendType = GhostSendType.All, SendDataForChildEntity = false},
fields = new[]
{
new GhostFieldModifier
{
name = "Value",
attribute = new GhostFieldAttribute{Quantization = 1000, Smoothing=SmoothingAction.InterpolateAndExtrapolate}
}
},
entityIndex = 0
};
overrides.Add(rotOverwrite.typeFullName, rotOverwrite);
}
public void ModifyAlwaysIncludedAssembly(HashSet<string> alwaysIncludedAssemblies)
{
}
public void ModifyTypeRegistry(TypeRegistry typeRegistry, string netCodeGenAssemblyPath)
{
}
- Created a .NetCodeGen assemply definition file:
filename: NetcodeOverwrites.NetCodeGen


But I still have the same quantization values for translation and rotation.
What step am I missing? (In previous netcode version I managed to modify it, but not since 0.6)
