-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from nrgill28/master
Anvil Prefabs
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters