MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Serialize

Method Serialize

Source/Engine/Foliage/FoliageType.cpp:145–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145void FoliageType::Serialize(SerializeStream& stream, const void* otherObj)
146{
147 SERIALIZE_GET_OTHER_OBJ(FoliageType);
148
149 SERIALIZE(Model);
150
151 const Function<bool(const ModelInstanceEntry&)> IsValidMaterial = [](const ModelInstanceEntry& e) -> bool
152 {
153 return e.Material;
154 };
155 if (ArrayExtensions::Any(Entries, IsValidMaterial))
156 {
157 stream.JKEY("Materials");
158 stream.StartArray();
159 for (auto& e : Entries)
160 stream.Guid(e.Material.GetID());
161 stream.EndArray();
162 }
163
164 SERIALIZE(CullDistance);
165 SERIALIZE(CullDistanceRandomRange);
166 SERIALIZE(ScaleInLightmap);
167 SERIALIZE_MEMBER(DrawModes, _drawModes);
168 SERIALIZE(ShadowsMode);
169 SERIALIZE_BIT(ReceiveDecals);
170 SERIALIZE_BIT(UseDensityScaling);
171 SERIALIZE(DensityScalingScale);
172
173 SERIALIZE(PaintDensity);
174 SERIALIZE(PaintRadius);
175 SERIALIZE(PaintGroundSlopeAngleMin);
176 SERIALIZE(PaintGroundSlopeAngleMax);
177 SERIALIZE(PaintScaling);
178 SERIALIZE(PaintScaleMin);
179 SERIALIZE(PaintScaleMax);
180
181 SERIALIZE(PlacementOffsetY);
182 SERIALIZE(PlacementRandomPitchAngle);
183 SERIALIZE(PlacementRandomRollAngle);
184 SERIALIZE_BIT(PlacementAlignToNormal);
185 SERIALIZE_BIT(PlacementRandomYaw);
186}
187
188void FoliageType::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
189{

Callers

nothing calls this directly

Calls 4

GuidMethod · 0.80
GetIDMethod · 0.80
StartArrayMethod · 0.45
EndArrayMethod · 0.45

Tested by

no test coverage detected