• The move of Eco-Mods.com has taken place and the merge of our old officials forums is currently ongoing, read more here.

Can't use a Component in a compiled DLL in a non-compiled script ?

GeeknessFr

Coal
Mod Dev
Messages
20
Reaction score
25
Hi,
I made a new WorldObjectComponent in C# like this :

C#:
using ....
using ....
using ....

namespace Eco.Gameplay.Components
{

    [Serialized]
    public class MyComponent : WorldObjectComponent
    {

        public override void Initialize()
        {
            base.Initialize();
            // ... //
        }

        public override void Tick()
        {
            base.Tick();
            // ... //
        }

        public static bool AnyFunction(int AnyVariable)
        {
            // ... //
        }
    }
}
I tried to put this .cs file (non-compiled) in Mods folder.. and it works fine. I can use my component in the Streetlamp.cs for exemple by adding :
C#:
[RequireComponent(typeof(MyComponent))]
But now, i want to compile my component in a DLL... and when i put this DLL in Mods folder... Streetlamp.cs return an error saying "MyComponent" is unknown...

If i use MyComponent in another Object i compiled in a DLL (my FloorLamp for exemple) it works fine !...

My question is : Is there a way to make it working ?
 
Last edited:

mampf

Moderator
Mod Dev
Eco-Mods.com Founder
Messages
115
Reaction score
71
Hello =)

I think there is no way. Because the files in the mod folder are loaded at different time than the .dll

Mampf
 
OP
GeeknessFr

GeeknessFr

Coal
Mod Dev
Messages
20
Reaction score
25
Hello Mampf,

Thank you for your reply, I talked about it to many people and, indeed, it seems that it's really impossible... :(
 
Top Bottom