Hello @gamingislove I've been debugging for hours, and can't find the reason why I'm not getting the list of SchemaSettings when calling var settings = Maki.Data.Get(), settings returned is not null, but the elements from the Editor are missing, E.g. settings.Get(0);

This is my MakinomDataExtension implementation

namespace RustedGames.ORKFramework
{
public class RGMakinomDataExtension : MakinomDataExtension
{
public RGMakinomDataExtension(){}

public override int Sorting
{
get
{
return 500;
}
}
public override void CreateInstance(){}

public override void Initialize(){}

public override void GetDataTypes(List<Type> types)
{
types.Add(typeof(SchemaSettings));
}

public override void InitTextCodes(List<BaseUITextCodes.TextCodeCollection> other)
{
}
}
}

Then my settings class

namespace RustedGames.ORKFramework
{
public class SchemaSettings : GenericAssetListSettings<SchemaAsset, Schema>
{
public SchemaSettings(MakinomProjectAsset project)
{
LoadProject(project);
CreateGUIDLookup();
}

public override string Filename
{
get { return "Schema"; }
}
}
}


and finally the test code in a monobehaviour

SchemaSettings settings = Maki.Data.Get<SchemaSettings>();
if (settings != null)
{
Schema schema = settings.Get(0);
if (schema == null)
{
Debug.LogError("Schema is null");
}
}


image
  • Moreover, I added my code to ORK sources, compiled the dll and it worked, so my guess now it is a reflection issue with Makinom DataHandler when having the code as scripts?
  • On first look that should work - can you send me all your custom scripts involved in this to contact@orkframework.com to check it out?
    Also, I assume ORK/Makinom has been initialized (e.g. via game starter) before accessing it?

    Generally, you can access the data directly via referencing the data assets.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I've sent the email, and yes ORK/Makinom has been initialized before accessing it.
    I do agree I can access the data directly by referencing the data asset stored in the Schema object, I'm trying to figure out the save/load of the custom runtime data belonging to the player.
  • I'll check it out.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.