Skip to content

Recipe must be instantiated using the ScriptableObject.CreateInstance method instead of new Recipe #5

Description

@SSyl

Hi,

I believe there's a problem in the library when adding new recipes. When you load up a world, it says the following in the logs:

[Warning: Unity Log] Recipe must be instantiated using the ScriptableObject.CreateInstance method instead of new Recipe.

At first I didn't think it was an issue, as the recipe was showing up no problem. However, on a new character I noticed the recipe never shows up unless you actually pick up the item in your inventory. Since the only way to actually get my item is by making it in the cauldron after you get the required items, it pretty much means you'll never be able to craft the item (because you'll never just happen upon the item).

You can see an example here of how someone else uses ScriptableObject.CreateInstance to add recipes:

https://github.com/RandyKnapp/ValheimMods/blob/b6761b001b4aa7999db0f60ad7b86f36be39607a/Common/PrefabCreator.cs#L52

Using his method I was able to get my recipes to show up in the game properly.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions