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

Method Deserialize

Source/Engine/Foliage/FoliageType.cpp:188–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188void FoliageType::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
189{
190 PROFILE_MEM(LevelFoliage);
191 DESERIALIZE(Model);
192
193 const auto member = stream.FindMember("Materials");
194 if (member != stream.MemberEnd() && member->value.IsArray())
195 {
196 auto& materials = member->value;
197 const auto size = materials.Size();
198 Entries.Resize(size);
199 for (rapidjson::SizeType i = 0; i < size; i++)
200 {
201 Serialization::Deserialize(materials[i], Entries[i].Material, modifier);
202 }
203 }
204
205 DESERIALIZE(CullDistance);
206 DESERIALIZE(CullDistanceRandomRange);
207 DESERIALIZE(ScaleInLightmap);
208 DESERIALIZE_MEMBER(DrawModes, _drawModes);
209 DESERIALIZE(ShadowsMode);
210 DESERIALIZE_BIT(ReceiveDecals);
211 DESERIALIZE_BIT(UseDensityScaling);
212 DESERIALIZE(DensityScalingScale);
213
214 DESERIALIZE(PaintDensity);
215 DESERIALIZE(PaintRadius);
216 DESERIALIZE(PaintGroundSlopeAngleMin);
217 DESERIALIZE(PaintGroundSlopeAngleMax);
218 DESERIALIZE(PaintScaling);
219 DESERIALIZE(PaintScaleMin);
220 DESERIALIZE(PaintScaleMax);
221
222 DESERIALIZE(PlacementOffsetY);
223 DESERIALIZE(PlacementRandomPitchAngle);
224 DESERIALIZE(PlacementRandomRollAngle);
225 DESERIALIZE_BIT(PlacementAlignToNormal);
226 DESERIALIZE_BIT(PlacementRandomYaw);
227}

Callers

nothing calls this directly

Calls 5

FindMemberMethod · 0.80
MemberEndMethod · 0.80
DeserializeFunction · 0.50
SizeMethod · 0.45
ResizeMethod · 0.45

Tested by

no test coverage detected