Skip to content

Commit

Permalink
Merge pull request #16 from nrgill28/master
Browse files Browse the repository at this point in the history
Anvil Prefabs
  • Loading branch information
Nolenz authored Aug 13, 2020
2 parents 557bb9e + cbf0927 commit 96c82f9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions WurstMod/Any/AnvilPrefab.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using UnityEngine;

namespace WurstMod.Any
{
public class AnvilPrefab : ComponentProxy
{
public string Guid;
public string Bundle;
public string AssetName;

public override void InitializeComponent()
{
var callback = AnvilManager.LoadAsync(new Anvil.AssetID {Guid = Guid, Bundle = Bundle, AssetName = AssetName});
callback.CompleteNow();
var prefab = Instantiate(callback.Result, transform.position, transform.rotation);
prefab.SetActive(true);
}

}
}
1 change: 1 addition & 0 deletions WurstMod/WurstMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Any\AICoverPoint.cs" />
<Compile Include="Any\AnvilPrefab.cs" />
<Compile Include="Any\FVRHandGrabPoint.cs" />
<Compile Include="Any\FVRReverbEnvironment.cs" />
<Compile Include="Any\PMat.cs" />
Expand Down

0 comments on commit 96c82f9

Please sign in to comment.