snozbot / fungus

An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
MIT License
1.63k stars 290 forks source link

Assembly file requirement. #964

Open gumishima opened 3 years ago

gumishima commented 3 years ago

This is not exactly a bug but I've seen it is bothering many old Fungus users, I don't think this would bother many new users. I always used Fungus v3.11.5 {#v3.11.5} on my project, but as soon Unity 2020 LTS came I changed my project to the newest LTS and noticed I had to update Fungus as the new Unity UI had some glitches over it. After updating my project and also Fungus (v3.13.6) (I've downloaded the most recent version on GitHub), I've proceeded to re-edit my Fungus codes so it works very nicely with my game, I haven't modified it too much, but I've done some modifications.

Screenshot_5

After a moment of re-editing the Fungus codes I've noticed my scripts couldn't be referenced on Fungus scripts anymore, it took me a bit to notice that Fungus now has an assembly file, which made my life a little complicated as my scripts aren't part of an assembly file, then not being able to be referenced on the Fungus one. I thought 'it must have a workaround for this but I can't find any solution to this, and I've noticed many people are complaining about this on the Fungus Forum's too, a friend of mine also noticed that and told me he couldn't update because of that.

I know the assembly file is probably required to make Fungus work at this point, but, isn't there any method to reference our codes inside of Fungus? I really appreciate working with Fungus and being able to modify and expand it to fit the necessities of my game, it makes the plugin very unique and inspiring. Sorry, I haven't attached any screenshots here, anything visual, but the 'bug' isn't really a bug and the information is very simple. :P Thanks for the attention and please have a nice day.

gumishima commented 3 years ago

Sorry for all the modifications on the issue, I'm learning how to use GitHub (lol). I found a nice method of working around this, I've created Unity Events and made the functions I wanted to create inside of Fungus code, but outside of its codes, then I just Invoke these Events at the same place I would modify the codes.

Although this works, I still wonder if the Assembly file is very necessary, but after creating this Events method I kinda like it more, as it leaves the Fungus codes without too many modifications.

stevehalliwell commented 3 years ago

This definitely can be a bit tricky, my guess is that your code doesn't have an asmdef and thus cannot indicate that it wan'ts to reference Fungus. If you don't want or cannot have an asmdef for your code for some reason, then in 3.13.6 you should be able to safely remove the asmdefs files from Fungus if it makes your project easier to work with.

Keen to hear more about the location and types of events you added/would like to see, that make it easier/cleaner for you to extend Fungus without modifications.

P.S. No worries about the many edits.