Skip to content

Commit

Permalink
fix(assets): set asset path relative to plugin dll (#145)
Browse files Browse the repository at this point in the history
Release-As: 1.0.0
  • Loading branch information
Xenira committed Mar 13, 2024
1 parent 441cd8f commit 85eda34
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cd ..

# Copy the mod dll to the mods folder
echo "Copying the mod dll to the mods folder..."
cp ./plugin/bin/Debug/netstandard2.1/techtonica_vr.* /c/Program\ Files\ \(x86\)/Steam/steamapps/common/Techtonica/BepInEx/plugins/
cp ./plugin/bin/Debug/netstandard2.1/techtonica_vr.* /c/Program\ Files\ \(x86\)/Steam/steamapps/common/Techtonica/BepInEx/plugins/techtonica_vr

# Copy the vr dlls to the game folder
echo "Copying the vr dlls to the game folder..."
Expand Down
2 changes: 2 additions & 0 deletions plugin/src/TechtonicaVR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ private void Awake()
Logger.LogInfo($"Loading plugin {MyPluginInfo.PLUGIN_GUID} version {MyPluginInfo.PLUGIN_VERSION}...");
License.LogLicense(Logger, "xenira", MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_VERSION);

AssetLoader.assetLoader = new PiUtils.Assets.AssetLoader(Path.Combine(Path.GetDirectoryName(Info.Location), "assets"));

ModConfig.Init(Config);

if (!ModConfig.ModEnabled())
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/assets/AssetLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class AssetLoader
{
private static PluginLogger Logger = PluginLogger.GetLogger<AssetLoader>();

private static PiUtils.Assets.AssetLoader assetLoader = new PiUtils.Assets.AssetLoader("techtonica_vr/assets");
public static PiUtils.Assets.AssetLoader assetLoader;

public static GameObject LeftHandBase;
public static GameObject RightHandBase;
Expand Down

0 comments on commit 85eda34

Please sign in to comment.