Skip to content

Commit

Permalink
Merge pull request #20 from alturanft/unity_bugs
Browse files Browse the repository at this point in the history
Releasing version 1.0.5
  • Loading branch information
mranoncoder authored Dec 23, 2022
2 parents ed0006d + 818fe46 commit f5a9e98
Show file tree
Hide file tree
Showing 25 changed files with 45 additions and 68 deletions.
2 changes: 1 addition & 1 deletion Altura-Sample~/AlturaDemo.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions Altura-Sample~/AlturaDemo/Get User Information.unity
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ RectTransform:
m_Father: {fileID: 989618426}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 158.2, y: -203.5}
m_SizeDelta: {x: 193.09, y: 33.566}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -241.8, y: -11.5}
m_SizeDelta: {x: 193.08997, y: 33.56601}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &15798127
MonoBehaviour:
Expand Down Expand Up @@ -678,9 +678,9 @@ RectTransform:
m_Father: {fileID: 989618426}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 181.7, y: -439.4}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -197.03, y: -151.4}
m_SizeDelta: {x: 294.0597, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &423096875
Expand Down Expand Up @@ -838,10 +838,10 @@ RectTransform:
m_Father: {fileID: 989618426}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 209.99, y: -121.5}
m_SizeDelta: {x: 280.02, y: 22}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -190.01001, y: 99.399994}
m_SizeDelta: {x: 280.02002, y: 22}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &602855604
MonoBehaviour:
Expand Down
16 changes: 2 additions & 14 deletions Altura-Sample~/AlturaDemo/Transfer Item.unity
Original file line number Diff line number Diff line change
Expand Up @@ -206,19 +206,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 15798128}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1913506717}
m_TargetAssemblyTypeName: AlturaNFT.Samples.AlturaDemo.GetUserDetails, AlturaNFT.Samples.AlturaDemo
m_MethodName: TransferItem_Run
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_Calls: []
--- !u!114 &15798128
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1731,7 +1719,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 989618425}
m_Enabled: 0
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
Expand Down
4 changes: 3 additions & 1 deletion Editor/AlturaNFTSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using UnityEditor;
using Newtonsoft.Json;
using UnityEditor.PackageManager;
using UnityEditor.VSAttribution.AlturaNFT.Editor;

namespace AlturaNFT.Editor
{
Expand Down Expand Up @@ -278,7 +279,8 @@ private void OnDisable()
public override void SaveChanges()
{
WriteToUserPrefs();
UserStats();
UserStats();
VSAttribution.SendAttributionEvent("SavingApiKey","AlturaNFT", myAPIString);
}

static void ShowHomeWindow()
Expand Down
2 changes: 1 addition & 1 deletion Editor/GetCollection_Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public override void OnInspectorGUI()
GUILayout.Box(banner);
GUILayout.EndHorizontal();

if (GUILayout.Button("GET Contract/Collection Transactions", GUILayout.Height(45)))
if (GUILayout.Button("GET Collection", GUILayout.Height(45)))
{
AlturaUser.SetFromEditorWin();
myScript.Run();
Expand Down
2 changes: 1 addition & 1 deletion Runtime/VSAttribution.cs → Editor/VSAttribution.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using UnityEngine.Analytics;

namespace UnityEditor.VSAttribution.AlturaNFT
namespace UnityEditor.VSAttribution.AlturaNFT.Editor
{
public static class VSAttribution
{
Expand Down
File renamed without changes.
4 changes: 1 addition & 3 deletions Runtime/AuthenticateUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEditor.VSAttribution.AlturaNFT;
namespace AlturaNFT
{ using Internal;

Expand Down Expand Up @@ -133,8 +132,7 @@ IEnumerator CallAPIProcess()
{
//Make request
UnityWebRequest request = UnityWebRequest.Get(WEB_URL);
request.SetRequestHeader("Content-Type", "application/json");
VSAttribution.SendAttributionEvent("Authenticate","AlturaNFT", _apiKey);
request.SetRequestHeader("Content-Type", "application/json");
string url = "https://api.alturanft.com/api/sdk/unity/";
WWWForm form = new WWWForm();
UnityWebRequest www = UnityWebRequest.Post(url + "Authenticate" + "?apiKey=" + _apiKey, form);
Expand Down
4 changes: 1 addition & 3 deletions Runtime/GetCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEditor.VSAttribution.AlturaNFT;

namespace AlturaNFT
{ using Internal;
Expand Down Expand Up @@ -124,7 +123,7 @@ string BuildUrl()
WEB_URL = RequestUriInit + _collection_address;

if(debugErrorLog)
Debug.Log("Querying Transactions of Collection: " + _collection_address );
Debug.Log("Querying information of Collection: " + _collection_address );

return WEB_URL;
}
Expand All @@ -135,7 +134,6 @@ IEnumerator CallAPIProcess()
UnityWebRequest request = UnityWebRequest.Get(WEB_URL);
request.SetRequestHeader("Content-Type", "application/json");
request.SetRequestHeader("source", AlturaUser.GetSource());
VSAttribution.SendAttributionEvent("GetCollection","AlturaNFT", _apiKey);

string url = "https://api.alturanft.com/api/sdk/unity/";
WWWForm form = new WWWForm();
Expand Down
5 changes: 2 additions & 3 deletions Runtime/GetCollections.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEditor.VSAttribution.AlturaNFT;


namespace AlturaNFT
{ using Internal;
Expand Down Expand Up @@ -193,7 +193,7 @@ string BuildUrl()

WEB_URL = RequestUriInit + "?" + jsonString;
if(debugErrorLog)
Debug.Log("Querying Details of User: " );
Debug.Log("Querying Details of Collections: " );

return WEB_URL;
}
Expand All @@ -204,7 +204,6 @@ IEnumerator CallAPIProcess()
UnityWebRequest request = UnityWebRequest.Get(WEB_URL);
request.SetRequestHeader("Content-Type", "application/json");
request.SetRequestHeader("source", AlturaUser.GetSource());
VSAttribution.SendAttributionEvent("GetCollections","AlturaNFT", _apiKey);
string url = "https://api.alturanft.com/api/sdk/unity/";
WWWForm form = new WWWForm();
UnityWebRequest www = UnityWebRequest.Post(url + "GetCollections" + "?apiKey=" + _apiKey, form);
Expand Down
5 changes: 2 additions & 3 deletions Runtime/GetHistory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEditor.VSAttribution.AlturaNFT;


namespace AlturaNFT
{ using Internal;
Expand Down Expand Up @@ -137,7 +137,7 @@ string BuildUrl()

WEB_URL = RequestUriInit + "/" + _address + "/" + _token_id.ToString();
if(debugErrorLog)
Debug.Log("Querying Single Holders Items by address and tokenId: " + _address + " on " );
Debug.Log("Querying History Items by address and tokenId: " + _address + " on " );
return WEB_URL;
}

Expand All @@ -147,7 +147,6 @@ IEnumerator CallAPIProcess()
UnityWebRequest request = UnityWebRequest.Get(WEB_URL);
request.SetRequestHeader("Content-Type", "application/json");
request.SetRequestHeader("source", AlturaUser.GetSource());
VSAttribution.SendAttributionEvent("GetHistoty","AlturaNFT", _apiKey);

string url = "https://api.alturanft.com/api/sdk/unity/";
WWWForm form = new WWWForm();
Expand Down
3 changes: 1 addition & 2 deletions Runtime/GetHolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEditor.VSAttribution.AlturaNFT;


namespace AlturaNFT
{ using Internal;
Expand Down Expand Up @@ -146,7 +146,6 @@ IEnumerator CallAPIProcess()
//Make request
UnityWebRequest request = UnityWebRequest.Get(WEB_URL);
request.SetRequestHeader("Content-Type", "application/json");
VSAttribution.SendAttributionEvent("GetHolder","AlturaNFT", _apiKey);

string url = "https://api.alturanft.com/api/sdk/unity/";
WWWForm form = new WWWForm();
Expand Down
3 changes: 1 addition & 2 deletions Runtime/GetItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEditor.VSAttribution.AlturaNFT;


namespace AlturaNFT
{ using Internal;
Expand Down Expand Up @@ -146,7 +146,6 @@ IEnumerator CallAPIProcess()
//Make request
UnityWebRequest request = UnityWebRequest.Get(WEB_URL);
request.SetRequestHeader("Content-Type", "application/json");
VSAttribution.SendAttributionEvent("GetItem","AlturaNFT", _apiKey);

string url = "https://api.alturanft.com/api/sdk/unity/";
WWWForm form = new WWWForm();
Expand Down
8 changes: 3 additions & 5 deletions Runtime/GetItems.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEditor.VSAttribution.AlturaNFT;


namespace AlturaNFT
{ using Internal;
Expand Down Expand Up @@ -47,7 +47,6 @@ public enum Chains
private string _slim = "false";


[SerializeField]
[Tooltip("Filter from a documents by any properties")]
[DrawIf("chain", Chains.binance , DrawIfAttribute.DisablingType.DontDrawInverse)]
private string jsonString;
Expand Down Expand Up @@ -212,7 +211,7 @@ string BuildUrl()
if (this._sortDir != null)
this.jsonString += "&sortDir=" + this._sortDir;
if(this._slim!=null)
this.jsonString = "&slim=" + this._slim;
this.jsonString += "&slim=" + this._slim;
if (this._name != null)
this.jsonString += "&name=" + this._name;
if (this._collectionAddress != null)
Expand Down Expand Up @@ -240,8 +239,7 @@ IEnumerator CallAPIProcess()
{
//Make request
UnityWebRequest request = UnityWebRequest.Get(WEB_URL);
request.SetRequestHeader("Content-Type", "application/json");
VSAttribution.SendAttributionEvent("GetItems","AlturaNFT", _apiKey);
request.SetRequestHeader("Content-Type", "application/json");
string url = "https://api.alturanft.com/api/sdk/unity/";
WWWForm form = new WWWForm();
UnityWebRequest www = UnityWebRequest.Post(url + "GetItems" + "?apiKey=" + _apiKey, form);
Expand Down
5 changes: 2 additions & 3 deletions Runtime/GetUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEditor.VSAttribution.AlturaNFT;


namespace AlturaNFT

Expand Down Expand Up @@ -137,8 +137,7 @@ IEnumerator CallAPIProcess()
{
//Make request
UnityWebRequest request = UnityWebRequest.Get(WEB_URL);
request.SetRequestHeader("Content-Type", "application/json");
VSAttribution.SendAttributionEvent("GetUser","AlturaNFT", _apiKey);
request.SetRequestHeader("Content-Type", "application/json");
string url = "https://api.alturanft.com/api/sdk/unity/";
WWWForm form = new WWWForm();
UnityWebRequest www = UnityWebRequest.Post(url + "GetUser" + "?apiKey=" + _apiKey, form);
Expand Down
5 changes: 2 additions & 3 deletions Runtime/GetUsers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEditor.VSAttribution.AlturaNFT;

namespace AlturaNFT
{ using Internal;

Expand Down Expand Up @@ -185,8 +185,7 @@ IEnumerator CallAPIProcess()
{
//Make request
UnityWebRequest request = UnityWebRequest.Get(WEB_URL);
request.SetRequestHeader("Content-Type", "application/json");
VSAttribution.SendAttributionEvent("GetUsers","AlturaNFT", _apiKey);
request.SetRequestHeader("Content-Type", "application/json");
string url = "https://api.alturanft.com/api/sdk/unity/";
WWWForm form = new WWWForm();
UnityWebRequest www = UnityWebRequest.Post(url + "GetUsers" + "?apiKey=" + _apiKey, form);
Expand Down
3 changes: 1 addition & 2 deletions Runtime/GetUsersItems.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Serialization;
using UnityEditor.VSAttribution.AlturaNFT;


namespace AlturaNFT
{ using Internal;
Expand Down Expand Up @@ -190,7 +190,6 @@ IEnumerator CallAPIProcess()
//Make request
UnityWebRequest request = UnityWebRequest.Get(WEB_URL);
request.SetRequestHeader("Content-Type", "application/json");
VSAttribution.SendAttributionEvent("GetUsersItems","AlturaNFT", _apiKey);
string url = "https://api.alturanft.com/api/sdk/unity/";
WWWForm form = new WWWForm();
UnityWebRequest www = UnityWebRequest.Post(url + "GetUsersItems" + "?apiKey=" + _apiKey, form);
Expand Down
2 changes: 2 additions & 0 deletions Runtime/Internal/AlturaConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public static class AlturaConstants
public const string FeatureName_GetCollections = "Get Many Collections | GetCollections";
public const string FeatureName_GetCollection = "Get 1 Collection | GetCollection";
public const string FeatureName_Transfer = "Transfer | TransferItem";
public const string FeatureName_TransferErc721 = "Transfer ERC721";
public const string FeatureName_TransferErc20 = "Transfer ERC20";
public const string FeatureName_TransferItems = "Transfers | TransferItems";
public const string FeatureName_MintAdditionalNFT = "Mint | MintAdditionalNFT";
public const string FeatureName_GetHolder = "Get Holder | Get Holder";
Expand Down
3 changes: 1 addition & 2 deletions Runtime/Internal/AlturaUserSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEditor.VSAttribution.AlturaNFT;


namespace AlturaNFT
{ using Internal;
Expand Down Expand Up @@ -143,7 +143,6 @@ IEnumerator CallAPIProcess()
request.SetRequestHeader("Content-Type", "application/json");
request.SetRequestHeader("source", AlturaUser.GetSource());
request.SetRequestHeader("Authorization", _apiKey);
VSAttribution.SendAttributionEvent("AlturaUserSetting","AlturaNFT", _apiKey);
string url = "https://api.alturanft.com/api/sdk/unity/";
WWWForm form = new WWWForm();
UnityWebRequest www = UnityWebRequest.Post(url + "AlturaUserSetting" + "?apiKey=" + _apiKey, form);
Expand Down
5 changes: 2 additions & 3 deletions Runtime/Internal/models/NFTs_model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class Items
{
public string name;
public string description;
//public Properties properties;
public Properties[] properties;
public int tokenId;
public string collectionAddress;
public int chainId;
Expand Down Expand Up @@ -67,10 +67,9 @@ public class AllImages
[Serializable]
public class Properties
{
public string _id;
public string name;
public string value;
public string staatic;
// public string static;

}

Expand Down
2 changes: 1 addition & 1 deletion Runtime/Internal/models/Txn_model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class MintReq
public string address;
public string to;
public string tokenId;
public string amounts;
public string amount;
}
[Serializable]
public class TransferReq
Expand Down
Loading

0 comments on commit f5a9e98

Please sign in to comment.