Skip to content

Commit d7f9548

Browse files
committed
Disponibilizacao do .apk, ajuste na escala do slider e comentarios dos scripts
1 parent f381b5d commit d7f9548

File tree

5 files changed

+23
-15
lines changed

5 files changed

+23
-15
lines changed

app/Assets/Plugins/KudanAR/Scripts/Components/KudanTracker.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,8 @@ IEnumerator Screenshot()
836836

837837
byte[] bytes = screen.EncodeToJPG ();
838838

839-
string filePath = Application.dataPath + "/Screenshot - " + Time.unscaledTime + ".jpg";
839+
//string filePath = Application.dataPath + "/Screenshot - " + Time.unscaledTime + ".jpg";
840+
string filePath = Application.persistentDataPath + "/Screenshot - " + Time.unscaledTime + ".jpg";
840841
System.IO.File.WriteAllBytes (filePath, bytes);
841842

842843
Debug.Log ("Saved screenshot at: " + filePath);

app/Assets/Scenes/RA.unity

-1.78 KB
Binary file not shown.

app/Assets/Scripts/DownloadModelScript.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,10 @@ string GetRearCamName ()
9696
IEnumerator AsyncDownloadModel (string url)
9797
{
9898
Debug.Log (url);
99-
downloadImage.enabled = true; // habilita a imagem animada de download
100-
UnityEngine.Networking.UnityWebRequest request = UnityEngine.Networking.UnityWebRequest.GetAssetBundle (url, 0); // faz uma requisicao web para determinada url
99+
// habilita a imagem animada de download
100+
downloadImage.enabled = true;
101+
// faz uma requisicao web para determinada url
102+
UnityWebRequest request = UnityWebRequest.GetAssetBundle (url, 0);
101103
request.Send ();
102104

103105
txtResult.text = "Downloading...";
@@ -119,14 +121,18 @@ IEnumerator AsyncDownloadModel (string url)
119121
// se carregado corretamente
120122
if (bundle) {
121123
txtResult.text = "Download concluído...";
122-
StaticData.objeto = bundle.LoadAsset<GameObject> ("model"); // obtem o objeto de nome model do asset bundle
124+
// obtem o objeto de nome model do asset bundle
125+
StaticData.objeto = bundle.LoadAsset<GameObject> ("model");
123126
downloadImage.enabled = false;
124127

125-
if (previewObject) // se já estava pré visualizando um objeto
128+
// se já estava pré visualizando um objeto
129+
if (previewObject)
130+
// destroi o objento
126131
Destroy (previewObject);
127-
128-
PreviewModel (); // método para pré-visualizado um objeto
129-
bundle.Unload (false); //evita um erro ao tentar importar o mesmo asset bundle mais de uma vez
132+
// chama o método responsável pela pré-visualização
133+
PreviewModel ();
134+
//evita um erro ao tentar importar o mesmo asset bundle mais de uma vez
135+
bundle.Unload (false);
130136
} else {
131137
txtResult.text = "Não foi possível obter o modelo 3D";
132138
}

app/Assets/Scripts/RaScript.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,14 @@ public void Altura(float altura){
9797
public void Rastrear ()
9898
{
9999
if (!_kudanTracker.ArbiTrackIsTracking ()) {
100-
// from the floor placer.
101-
Vector3 floorPosition; // The current position in 3D space of the floor
102-
Quaternion floorOrientation; // The current orientation of the floor in 3D space, relative to the device
103-
104-
_kudanTracker.FloorPlaceGetPose (out floorPosition, out floorOrientation); // Gets the position and orientation of the floor and assigns the referenced Vector3 and Quaternion those values
105-
_kudanTracker.ArbiTrackStart (floorPosition, floorOrientation); // Starts markerless tracking based upon the given floor position and orientations
106-
100+
// baseado no icone de posicionamento (Arrow)
101+
Vector3 floorPosition;
102+
Quaternion floorOrientation;
103+
104+
// obtem o posicionamento e orientacao do "piso" da cena
105+
_kudanTracker.FloorPlaceGetPose (out floorPosition, out floorOrientation);
106+
// inicia o rastreamento sem marcador baseado nos parametros de posicao e orientacao
107+
_kudanTracker.ArbiTrackStart (floorPosition, floorOrientation);
107108
} else {
108109
_kudanTracker.ArbiTrackStop ();
109110
}

arview.apk

23 MB
Binary file not shown.

0 commit comments

Comments
 (0)