BoltEngine / Bolt-Tracker

New issue tracker for Photon Bolt
10 stars 2 forks source link

Bolt not friendly to assembly definitions #95

Closed jswigart closed 5 years ago

jswigart commented 5 years ago

Assembly definition files are a mechanism in newer versions of unity to allow you to break up your project into a number of assemblies, to reduce compilation speed, etc.

https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html

With this system it's common practice to break large third party assets into their own assembly since they are rarely modified.

Bolt doesn't appear to be friendly to being put in its own assembly and functioning with game code that is in another assembly

How to reproduce issue

  1. Create an assembly definition file in the bolt folder
  2. Create a global GlobalEventListener subclass in another assembly
  3. Start a server or client instance

Expected Behavior

I would expect that GlobalEventListener subclasses would be found and instantiated across all loaded assemblies

Actual behavior

The GlobalEventListener subclasses you have in assemblies other than the bolt assembly will not be instantiated.

Configuration

Assuming this is a simple fix of searching for these listeners across all assemblies and not just the current one.

vladnau89 commented 5 years ago

Hello! I have the same problem. You can fix it : at BoltLauncher.cs method GetGlobalBehaviourTypes()

replace Assembly asm = Assembly.GetExecutingAssembly(); to Assembly asm = Assembly.Load("YOUR ASMDEF NAME");

ramonmelo commented 5 years ago

Fixed on the next release. Thanks for your feedback!

melMass commented 3 years ago

Fixed on the next release. Thanks for your feedback!

Can I ask how it works? I want to add custom Units from a custom package, but there is nothing related to Bolt or Ludiq in the Assembly References dropdown 👶

herpdederp commented 3 years ago

Fixed on the next release.

Thanks for your feedback!

Can I ask how it works?

I want to add custom Units from a custom package, but there is nothing related to Bolt or Ludiq in the Assembly References dropdown 👶

Photon Bolt is unrelated to Ludiq and visual scripting.

melMass commented 3 years ago

Oops thanks, not obvious at all tbh