From f192a71c56ecbad50b7f53daa46615ae86ff9796 Mon Sep 17 00:00:00 2001 From: Daniel Cronqvist Date: Thu, 21 Nov 2024 17:52:54 +0100 Subject: [PATCH] Add disclaimer about FromClass with classes that contain enums --- docs/docs/essentials/custom-properties.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/docs/essentials/custom-properties.md b/docs/docs/essentials/custom-properties.md index addffd3..6ac6b38 100644 --- a/docs/docs/essentials/custom-properties.md +++ b/docs/docs/essentials/custom-properties.md @@ -203,6 +203,9 @@ var entityDataDef = CustomClassDefinition.FromClass(); The above gives us two custom type definitions that we can supply to our map loader. Given a map that looks like this: +> [!WARNING] +> For classes that you call `FromClass` on, which also contain enum properties (at some level of depth) that you want to map to a C# enum, you must also supply the custom enum definitions to the map loader. This is so that the map loader can resolve the enum values correctly. + ```xml