Open Wesley-wasnietavailabledusdanmaarzo opened 10 months ago
It seems that regular scripts aren't allowed to be included in the AssetBundle. I thought having the scripts in a dll would resolve it but while loading in the game tells me: Warning: Unity Log] The referenced script (mydllfile.myscript) on this Behaviour is missing! Even though the gameobjects definitely has the correct script attached. Not sure if this is my fault but I'm a bit confused now.
this is not allowed, a bundle can't be scanned with any antivirus so it's easy to put malwares in them theres a whitelist of allowed components
That makes sense. So I'm guessing there is no way to have custom stuff happen like.. a box trigger enabling some particles or having a sound play every so many seconds for instance.
That makes sense. So I'm guessing there is no way to have custom stuff happen like.. a box trigger enabling some particles or having a sound play every so many seconds for instance.
i planned to add some scripts to do that, but i never did it, and the mod is in end of support so.. :/
Wouldn't it be possible to include these scripts in a separate DLL and run them from there?
Wouldn't it be possible to include these scripts in a separate DLL and run them from there?
Yes, you need to make a DLL, bundles can't store scripts Load this DLL in unity by placing it in a plugins folder
I did try this but whenever I referenced a script from my dll on objects in the prefab, when loaded, the game couldn't find them.
I did try this but whenever I referenced a script from my dll on objects in the prefab, when loaded, the game couldn't find them.
Same on that, Little success. I have tried using a bepinex plugin to add the dll via bepinex, but it still couldn't find the reference. won't stop me from trying to figure it out lol.
My theory would be having it added as a component using an auxilary help plugin is one of the ways to do it, but depending on what you're trying to acomplish, this method might either be unmanagable or just unperformant.
Does your bepinex plugins was loading before lethal Expansion?
Does your bepinex plugins was loading before lethal Expansion?
Nope, it seems lethalSDK has priority over the plugin, and I lack the knowledge on how to increase priority.
Does your bepinex plugins was loading before lethal Expansion?
Nope, it seems lethalSDK has priority over the plugin, and I lack the knowledge on how to increase priority.
Add a dependency for Lethal Expansion in your plugin Look for Bepinex dependency flag
Does your bepinex plugins was loading before lethal Expansion?
Nope, it seems lethalSDK has priority over the plugin, and I lack the knowledge on how to increase priority.
Add a dependency for Lethal Expansion in your plugin Look for Bepinex dependency flag
What I'm guessing is doing something along the lines of
[BepInPlugin(GUID, Name, Version)]
[BepInDependency("HolographicWings-LethalExpansion-1.3.30", BepInDependency.DependencyFlags.HardDependency)]
On top of the class inheriting BaseUnityPlugin?
Yes but the id of the mod is just LethalExpansion A tip is to check the name of the config file
I've tested that, yet still comes out as not being found on the object inside the map,
Using a simple class "ExistanceNotifier"
public class ExistanceNotifier : MonoBehaviour
{
[SerializeField] private string message;
public void Awake()
{
Debug.Log(message);
}
}
Using the reference
[BepInPlugin(GUID, Name, Version)]
[BepInDependency("LethalExpansion", BepInDependency.DependencyFlags.HardDependency)]
Inside the editor of the moon itself, simple awake checker
Yet, in the command line, twice: Once, before the game has started and everything is being initialized And once the moon has loaded.
So, I'm not sure exactly what the root cause of the missing dependencies could be at this point.
I tried on my side too LethalExpansion need your DLL as dependance, so it will need every DLL of every peoples who make custom script as dependance I will look for an alternative, like Lua scripting
Lua is not made for Unity, it works but i will have to write every unity function which will take me months..
It seems that regular scripts aren't allowed to be included in the AssetBundle. I thought having the scripts in a dll would resolve it but while loading in the game tells me: Warning: Unity Log] The referenced script (mydllfile.myscript) on this Behaviour is missing! Even though the gameobjects definitely has the correct script attached. Not sure if this is my fault but I'm a bit confused now.