Commit 0345388ff67f8286a95b15497d2cebaf4dd951bd
1 parent
af3954a2
Exists in
master
and in
1 other branch
Modifica script inspetor para requisição web
Showing
8 changed files
with
41 additions
and
24 deletions
Show diff stats
Assets/Resources/ANIMS/anims/LAVID.anim.meta
Assets/Resources/ANIMS/anims/MAIS.anim.meta
Assets/Resources/ANIMS/anims/SUCESSO.anim.meta
Assets/Resources/ANIMS/anims/UFPB.anim.meta
Assets/Resources/ANIMS/anims/VLIBRAS.anim.meta
Assets/Scene.unity
@@ -134,7 +134,7 @@ Prefab: | @@ -134,7 +134,7 @@ Prefab: | ||
134 | objectReference: {fileID: 0} | 134 | objectReference: {fileID: 0} |
135 | - target: {fileID: 491010, guid: 00197fc9877daa14c963e5917de36124, type: 2} | 135 | - target: {fileID: 491010, guid: 00197fc9877daa14c963e5917de36124, type: 2} |
136 | propertyPath: m_RootOrder | 136 | propertyPath: m_RootOrder |
137 | - value: 0 | 137 | + value: 1 |
138 | objectReference: {fileID: 0} | 138 | objectReference: {fileID: 0} |
139 | - target: {fileID: 11171278, guid: 00197fc9877daa14c963e5917de36124, type: 2} | 139 | - target: {fileID: 11171278, guid: 00197fc9877daa14c963e5917de36124, type: 2} |
140 | propertyPath: m_Animations.Array.data[0] | 140 | propertyPath: m_Animations.Array.data[0] |
@@ -193,7 +193,7 @@ Prefab: | @@ -193,7 +193,7 @@ Prefab: | ||
193 | objectReference: {fileID: 0} | 193 | objectReference: {fileID: 0} |
194 | - target: {fileID: 426230, guid: cd81d95d2fa8dc448b18a415b9009d43, type: 2} | 194 | - target: {fileID: 426230, guid: cd81d95d2fa8dc448b18a415b9009d43, type: 2} |
195 | propertyPath: m_RootOrder | 195 | propertyPath: m_RootOrder |
196 | - value: 2 | 196 | + value: 0 |
197 | objectReference: {fileID: 0} | 197 | objectReference: {fileID: 0} |
198 | m_RemovedComponents: [] | 198 | m_RemovedComponents: [] |
199 | m_ParentPrefab: {fileID: 100100000, guid: cd81d95d2fa8dc448b18a415b9009d43, type: 2} | 199 | m_ParentPrefab: {fileID: 100100000, guid: cd81d95d2fa8dc448b18a415b9009d43, type: 2} |
@@ -235,7 +235,7 @@ Prefab: | @@ -235,7 +235,7 @@ Prefab: | ||
235 | objectReference: {fileID: 0} | 235 | objectReference: {fileID: 0} |
236 | - target: {fileID: 22403302, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} | 236 | - target: {fileID: 22403302, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} |
237 | propertyPath: m_RootOrder | 237 | propertyPath: m_RootOrder |
238 | - value: 1 | 238 | + value: 2 |
239 | objectReference: {fileID: 0} | 239 | objectReference: {fileID: 0} |
240 | - target: {fileID: 22403302, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} | 240 | - target: {fileID: 22403302, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} |
241 | propertyPath: m_AnchoredPosition.x | 241 | propertyPath: m_AnchoredPosition.x |
Assets/Scripts/InspectorScript.cs
1 | //Log Dir http://docs.unity3d.com/Manual/LogFiles.html | 1 | //Log Dir http://docs.unity3d.com/Manual/LogFiles.html |
2 | using UnityEngine; | 2 | using UnityEngine; |
3 | -using UnityEditor; | ||
4 | using System.Collections; | 3 | using System.Collections; |
5 | using System.Collections.Generic; | 4 | using System.Collections.Generic; |
6 | using System; | 5 | using System; |
@@ -29,10 +28,6 @@ public class InspectorScript : MonoBehaviour { | @@ -29,10 +28,6 @@ public class InspectorScript : MonoBehaviour { | ||
29 | 28 | ||
30 | void Start( ){ | 29 | void Start( ){ |
31 | 30 | ||
32 | - | ||
33 | - | ||
34 | - | ||
35 | - | ||
36 | try{ Debug.Log("Inicializando: "+coreInitialize( )); }catch(Exception e){ Debug.Log (e.ToString());} | 31 | try{ Debug.Log("Inicializando: "+coreInitialize( )); }catch(Exception e){ Debug.Log (e.ToString());} |
37 | 32 | ||
38 | ICARO = GameObject.FindGameObjectWithTag("avatar"); | 33 | ICARO = GameObject.FindGameObjectWithTag("avatar"); |
@@ -47,8 +42,6 @@ public class InspectorScript : MonoBehaviour { | @@ -47,8 +42,6 @@ public class InspectorScript : MonoBehaviour { | ||
47 | 42 | ||
48 | void addAlpha( ){ | 43 | void addAlpha( ){ |
49 | 44 | ||
50 | - | ||
51 | - | ||
52 | foreach( char letter in alfabeto ){ | 45 | foreach( char letter in alfabeto ){ |
53 | 46 | ||
54 | aniClip = Resources.Load<AnimationClip> ("ANIMS/alpha/"+letter); | 47 | aniClip = Resources.Load<AnimationClip> ("ANIMS/alpha/"+letter); |
@@ -183,12 +176,36 @@ public class InspectorScript : MonoBehaviour { | @@ -183,12 +176,36 @@ public class InspectorScript : MonoBehaviour { | ||
183 | 176 | ||
184 | } | 177 | } |
185 | 178 | ||
186 | - void onGui(){ | 179 | + void OnGUI(){ |
187 | 180 | ||
188 | if( GUI.Button(new Rect(10, 10, 50, 50), "TESTE") ){ | 181 | if( GUI.Button(new Rect(10, 10, 50, 50), "TESTE") ){ |
189 | - Debug.Log("Clicked the button with an image"); | 182 | + int version = 1; |
183 | + | ||
184 | + //StartCoroutine( bundleCatch(glosa.ToLower(), version) ); | ||
185 | + StartCoroutine( bundleCatch("ABOBRINHA", version) ); | ||
190 | } | 186 | } |
191 | - | 187 | + |
188 | + | ||
189 | + } | ||
190 | + | ||
191 | + IEnumerator bundleCatch( String token, int version ){ string BaseURL = "http://150.165.205.9/anims/"; | ||
192 | + | ||
193 | + WWW www = WWW.LoadFromCacheOrDownload(BaseURL+token, version); | ||
194 | + yield return www; | ||
195 | + if (www.error != null) throw new Exception("Erro no WWW! Se liga nego: " + www.error); | ||
196 | + | ||
197 | + UnityEngine.Object[] bundleBaixado = www.assetBundle.LoadAllAssets(); | ||
198 | + | ||
199 | + foreach(UnityEngine.Object animacao in bundleBaixado){ | ||
200 | + | ||
201 | + COMPONENT_ANIMATION.AddClip(animacao as AnimationClip, animacao.name); | ||
202 | + | ||
203 | + Debug.Log(animacao.name+" - "+animacao.GetType()); | ||
204 | + | ||
205 | + COMPONENT_ANIMATION.CrossFadeQueued(animacao.name, 0.6f, QueueMode.CompleteOthers); | ||
206 | + | ||
207 | + } | ||
208 | + | ||
192 | } | 209 | } |
193 | 210 | ||
194 | } | 211 | } |
195 | \ No newline at end of file | 212 | \ No newline at end of file |
ProjectSettings/ProjectSettings.asset
@@ -402,7 +402,7 @@ PlayerSettings: | @@ -402,7 +402,7 @@ PlayerSettings: | ||
402 | WebGL::audioCompressionFormat: 4 | 402 | WebGL::audioCompressionFormat: 4 |
403 | WebGL::exceptionSupport: 0 | 403 | WebGL::exceptionSupport: 0 |
404 | WebGL::memorySize: 256 | 404 | WebGL::memorySize: 256 |
405 | - iOS::Architecture: 2 | 405 | + iOS::Architecture: 0 |
406 | iOS::ScriptingBackend: 0 | 406 | iOS::ScriptingBackend: 0 |
407 | boolPropertyNames: | 407 | boolPropertyNames: |
408 | - WebGL::dataCaching | 408 | - WebGL::dataCaching |