-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Style updates and Feature Spawners : NFTPort Features now avail…
…able in Component and Game Object Add menus
- Loading branch information
Showing
14 changed files
with
182 additions
and
7 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,82 @@ | ||
using NFTPort.Internal; | ||
using UnityEditor; | ||
using UnityEngine; | ||
|
||
namespace NFTPort.Editor | ||
{ | ||
|
||
public class FeatureSpawner : EditorWindow | ||
{ | ||
|
||
//GameObject | ||
private const string GameObjMenu = "GameObject/NFTPort/"; | ||
|
||
|
||
[MenuItem(PortConstants.BaseFeatureSpawnerMenu + PortConstants.FeatureName_NFTs_OfAccount)] | ||
[MenuItem(GameObjMenu + PortConstants.FeatureName_NFTs_OfAccount)] | ||
static void Spawn_NFtsOfAccount() | ||
{ | ||
new GameObject(PortConstants.FeatureName_NFTs_OfAccount).AddComponent<NFTs_OwnedByAnAccount>(); | ||
} | ||
|
||
[MenuItem(PortConstants.BaseFeatureSpawnerMenu + PortConstants.FeatureName_NFTs_OfContract)] | ||
[MenuItem(GameObjMenu + PortConstants.FeatureName_NFTs_OfContract)] | ||
static void Spawn_NFtsOfContract() | ||
{ | ||
new GameObject(PortConstants.FeatureName_NFTs_OfContract).AddComponent<NFTs_OfAContract>(); | ||
} | ||
|
||
[MenuItem(PortConstants.BaseFeatureSpawnerMenu + PortConstants.FeatureName_StorageFiles)] | ||
[MenuItem(GameObjMenu + PortConstants.FeatureName_StorageFiles)] | ||
static void Spawn_StorageFile() | ||
{ | ||
new GameObject(PortConstants.FeatureName_StorageFiles).AddComponent<Storage_UploadFile>(); | ||
} | ||
|
||
[MenuItem(PortConstants.BaseFeatureSpawnerMenu + PortConstants.FeatureName_StorageMetadata)] | ||
[MenuItem(GameObjMenu + PortConstants.FeatureName_StorageMetadata)] | ||
static void Spawn_StorageMetadata() | ||
{ | ||
new GameObject(PortConstants.FeatureName_StorageMetadata).AddComponent<Storage_UploadMetadata>(); | ||
} | ||
|
||
[MenuItem(PortConstants.BaseFeatureSpawnerMenu + PortConstants.FeatureName_AssetDownloader)] | ||
[MenuItem(GameObjMenu + PortConstants.FeatureName_AssetDownloader)] | ||
static void FeatureName_AssetDownloader() | ||
{ | ||
new GameObject(PortConstants.FeatureName_AssetDownloader).AddComponent<AssetDownloader>(); | ||
} | ||
|
||
[MenuItem(PortConstants.BaseFeatureSpawnerMenu + PortConstants.FeatureName_ConnectUserWallet)] | ||
[MenuItem(GameObjMenu + PortConstants.FeatureName_ConnectUserWallet)] | ||
static void FeatureName_ConnectWallet() | ||
{ | ||
new GameObject(PortConstants.FeatureName_ConnectUserWallet).AddComponent<ConnectPlayerWallet>(); | ||
} | ||
|
||
[MenuItem(PortConstants.BaseFeatureSpawnerMenu + PortConstants.FeatureName_Mint_Custom)] | ||
[MenuItem(GameObjMenu + PortConstants.FeatureName_Mint_Custom)] | ||
static void FeatureName_Mint_Custom() | ||
{ | ||
new GameObject(PortConstants.FeatureName_Mint_Custom).AddComponent<Mint_Custom>(); | ||
} | ||
|
||
[MenuItem(PortConstants.BaseFeatureSpawnerMenu + PortConstants.FeatureName_Mint_URL)] | ||
[MenuItem(GameObjMenu + PortConstants.FeatureName_Mint_URL)] | ||
static void FeatureName_Mint_URL() | ||
{ | ||
new GameObject(PortConstants.FeatureName_Mint_URL).AddComponent<Mint_URL>(); | ||
} | ||
|
||
[MenuItem(PortConstants.BaseFeatureSpawnerMenu + PortConstants.FeatureName_Deploy)] | ||
[MenuItem(GameObjMenu + PortConstants.FeatureName_Deploy)] | ||
static void FeatureName_Deploy() | ||
{ | ||
new GameObject(PortConstants.FeatureName_Deploy).AddComponent<Deploy>(); | ||
} | ||
|
||
|
||
|
||
} | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,34 @@ | ||
using UnityEngine; | ||
|
||
namespace NFTPort.Editor | ||
{ | ||
using UnityEditor; | ||
using Internal; | ||
|
||
[CustomEditor(typeof(Deploy))] | ||
public class Deploy_Contract_Editor : Editor | ||
{ | ||
public override void OnInspectorGUI() | ||
{ | ||
|
||
Deploy myScript = (Deploy)target; | ||
|
||
|
||
Texture banner = Resources.Load<Texture>("c_productmint"); | ||
GUILayout.BeginHorizontal(); | ||
GUILayout.Box(banner); | ||
GUILayout.EndHorizontal(); | ||
|
||
if (GUILayout.Button("Deploy Product Contract", GUILayout.Height(45))) | ||
{ | ||
myScript.Run(); | ||
} | ||
|
||
|
||
if(GUILayout.Button("View Documentation", GUILayout.Height(25))) | ||
Application.OpenURL(PortConstants.Docs_DeployContract); | ||
DrawDefaultInspector(); | ||
} | ||
} | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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