| | 1 | | using DCL.Components; |
| | 2 | | using DCL.Configuration; |
| | 3 | | using System.Collections; |
| | 4 | | using System.Collections.Generic; |
| | 5 | | using UnityEngine; |
| | 6 | |
|
| | 7 | | [System.Serializable] |
| | 8 | | public class SceneObject |
| | 9 | | { |
| | 10 | | [System.Serializable] |
| | 11 | | public class ObjectMetrics |
| | 12 | | { |
| | 13 | | public int meshes; |
| | 14 | | public int bodies; |
| | 15 | | public int materials; |
| | 16 | | public int textures; |
| | 17 | | public int triangles; |
| | 18 | | public int entities; |
| | 19 | | } |
| | 20 | |
|
| | 21 | | public string id; |
| | 22 | | public string asset_pack_id; |
| | 23 | | public string name; |
| | 24 | | public string model; |
| | 25 | | public string thumbnail; |
| | 26 | | public List<string> tags; |
| | 27 | |
|
| | 28 | | public string category; |
| | 29 | | public string titleToShow; |
| | 30 | | public Dictionary<string, string> contents; |
| | 31 | |
|
| | 32 | | public string created_at; |
| | 33 | | public string updated_at; |
| | 34 | |
|
| | 35 | | public ObjectMetrics metrics; |
| | 36 | | public SmartItemParameter[] parameters; |
| | 37 | | public SmartItemAction[] actions; |
| | 38 | | public string script; |
| | 39 | | public bool isFavorite = false; |
| | 40 | |
|
| | 41 | | public string GetComposedThumbnailUrl() |
| | 42 | | { |
| | 43 | | //NOTE: This is a workaround since the builder sometimes send the thumbnail composed and sometimes it doesn't |
| | 44 | | //This way we ensure that the base url is only 1 time |
| 78 | 45 | | string urlBase = BIWUrlUtils.GetUrlSceneObjectContent(); |
| 78 | 46 | | if (thumbnail != null) |
| 75 | 47 | | urlBase = urlBase + thumbnail.Replace(urlBase, ""); |
| 78 | 48 | | return urlBase; |
| | 49 | | } |
| | 50 | |
|
| 0 | 51 | | public string GetBaseURL() { return BIWUrlUtils.GetUrlSceneObjectContent(); } |
| | 52 | |
|
| 0 | 53 | | public bool IsSmartItem() { return !string.IsNullOrEmpty(script); } |
| | 54 | | } |