| | 1 | | using UnityEngine; |
| | 2 | |
|
| | 3 | | namespace DCL.Configuration |
| | 4 | | { |
| | 5 | | public static class BIWSettings |
| | 6 | | { |
| | 7 | | //Note: Don't use these URL directly, you need to get them in the BuilderInWorldUtils to take into account the E |
| | 8 | | public const string BASE_URL_SCENE_OBJECT_CONTENT = "https://builder-api.decentraland.{ENV}/v1/storage/contents/ |
| | 9 | | public const string BASE_URL_CATALOG = "https://builder-api.decentraland.{ENV}/v1/assetPacks?owner="; |
| | 10 | | public const string BASE_URL_BUILDER_API = "https://builder-api.decentraland.{ENV}/v1"; |
| | 11 | | public const string BASE_URL_ASSETS_PACK_CONTENT = "https://builder-api.decentraland.{ENV}/v1/storage/assetPacks |
| | 12 | |
|
| | 13 | | public const string BASE_URL_BUILDER_PROJECT_THUMBNAIL = "https://builder-api.decentraland.{ENV}/v1/projects/{id |
| | 14 | |
|
| | 15 | | public static readonly LayerMask SELECTION_LAYER_INDEX = LayerMask.NameToLayer("Selection"); |
| | 16 | | public static readonly LayerMask DEFAULT_LAYER_INDEX = LayerMask.NameToLayer("Default"); |
| | 17 | | public static readonly LayerMask COLLIDER_SELECTION_LAYER_INDEX = LayerMask.NameToLayer("OnBuilderPointerClick") |
| | 18 | |
|
| | 19 | | public static readonly LayerMask SELECTION_LAYER = LayerMask.GetMask("Selection"); |
| | 20 | | public static readonly LayerMask COLLIDER_SELECTION_LAYER = LayerMask.GetMask("OnBuilderPointerClick"); |
| | 21 | | public static readonly LayerMask GIZMOS_LAYER = LayerMask.GetMask("Gizmo"); |
| | 22 | | public static readonly LayerMask GROUND_LAYER = LayerMask.GetMask("Ground"); |
| | 23 | |
|
| | 24 | | public const int PARCEL_SIZE_METERS = 16; |
| | 25 | |
|
| | 26 | | public const string VOXEL_ASSETS_PACK_ID = "b51e5e7c-c56b-4ad9-b9d2-1dc1c6546169"; |
| | 27 | | public const string SMART_ITEM_ASSETS_PACK_ID = "07e7e010-3003-496d-a720-2a714a63a58b"; |
| | 28 | | public const string FLOOR_CATEGORY = "ground"; |
| | 29 | |
|
| | 30 | | public const string CATALOG_ASSET_PACK_TITLE = "Asset Packs"; |
| | 31 | | public const string VOXEL_TAG = "Voxel"; |
| | 32 | | public const string CUSTOM_LAND = "CUSTOM LAND"; |
| | 33 | |
|
| | 34 | | //Inputs |
| | 35 | | public static float MOUSE_THRESHOLD_FOR_DRAG = 15f; |
| | 36 | | public static float MOUSE_MS_DOUBLE_CLICK_THRESHOLD = 500f; |
| | 37 | |
|
| | 38 | | //Kernel Report |
| | 39 | | public const string STATE_EVENT_NAME = "stateEvent"; |
| | 40 | | public const string SCENE_EVENT_NAME = "SceneEvent"; |
| | 41 | | public const string BIW_HEADER_REQUEST_WITH_PARAM_EVENT_NAME = "RequestSignedHeaderForBuilder"; |
| | 42 | | public static float ENTITY_POSITION_REPORTING_DELAY = 0.1f; // In seconds |
| | 43 | | public static float ENTITY_POSITION_REPORTING_THRESHOLD = 0.04f; // In meters |
| | 44 | | public static float ENTITY_SCALE_REPORTING_THRESHOLD = 0.04f; // In meters |
| | 45 | | public static float ENTITY_ROTATION_REPORTING_THRESHOLD = 0.1f; // In degrees |
| | 46 | |
|
| | 47 | | //Floor Scene Object |
| | 48 | | public const string FLOOR_ID = "c9b17021-765c-4d9a-9966-ce93a9c323d1"; |
| | 49 | | public const string FLOOR_MODEL = "FloorBaseGrass_01/FloorBaseGrass_01.glb"; |
| | 50 | | public const string FLOOR_NAME = "Floor"; |
| | 51 | | public const string FLOOR_ASSET_PACK_NAME = "Genesis City"; |
| | 52 | |
|
| | 53 | | public const string FLOOR_GLTF_KEY = "FloorBaseGrass_01/FloorBaseGrass_01.glb"; |
| | 54 | | public const string FLOOR_GLTF_VALUE = "QmSyvWnb5nKCaGHw9oHLSkwywvS5NYpj6vgb8L121kWveS"; |
| | 55 | |
|
| | 56 | | public const string FLOOR_TEXTURE_KEY = "FloorBaseGrass_01/Floor_Grass01.png.png"; |
| | 57 | | public const string FLOOR_TEXTURE_VALUE = "QmT1WfQPMBVhgwyxV5SfcfWivZ6hqMCT74nxdKXwyZBiXb"; |
| | 58 | |
|
| | 59 | | //Collectables |
| | 60 | | public const string ASSETS_COLLECTIBLES = "Collectibles"; |
| | 61 | | public const string COLLECTIBLE_MODEL_PROTOCOL = "ethereum://"; |
| | 62 | |
|
| | 63 | | //Gizmos |
| | 64 | | public const string TRANSLATE_GIZMO_NAME = "MOVE"; |
| | 65 | | public const string ROTATE_GIZMO_NAME = "ROTATE"; |
| | 66 | | public const string SCALE_GIZMO_NAME = "SCALE"; |
| | 67 | | public const string EMPTY_GIZMO_NAME = "NONE"; |
| | 68 | | public const float GIZMOS_RELATIVE_SCALE_RATIO = 0.06f; |
| | 69 | |
|
| | 70 | | //Publish |
| | 71 | | public const string PUBLISH_MODAL_TITLE = "Publish Scene"; |
| | 72 | | public const string PUBLISH_MODAL_SUBTITLE = "Are you sure you want to publish your scene to this Land?"; |
| | 73 | | public const string PUBLISH_MODAL_CONFIRM_BUTTON = "PUBLISH"; |
| | 74 | | public const string PUBLISH_MODAL_CANCEL_BUTTON = "CANCEL"; |
| | 75 | | public const string EXIT_MODAL_TITLE = "Exiting Builder mode"; |
| | 76 | | public const string EXIT_MODAL_SUBTITLE = "Are you sure you want to exit Builder mode?"; |
| | 77 | | public const string EXIT_MODAL_CONFIRM_BUTTON = "EXIT"; |
| | 78 | | public const string EXIT_MODAL_CANCEL_BUTTON = "CANCEL"; |
| | 79 | | public const string EXIT_WITHOUT_PUBLISH_MODAL_SUBTITLE = "There are unpublished changes in this project. But do |
| | 80 | | public const string EXIT_WITHOUT_PUBLISH_MODAL_CONFIRM_BUTTON = "GOT IT!"; |
| | 81 | | public const string EXIT_WITHOUT_PUBLISH_MODAL_CANCEL_BUTTON = "BACK"; |
| | 82 | |
|
| | 83 | | //Others |
| | 84 | | public const float RAYCAST_MAX_DISTANCE = 10000f; |
| | 85 | | public const string LAND_EDITION_NOT_ALLOWED_BY_PERMISSIONS_MESSAGE = "This land does not belong to you, nor hav |
| | 86 | | public const string LAND_EDITION_WAITING_FOR_PERMISSIONS_MESSAGE = "Checking if you have permission to edit this |
| | 87 | | public const string LAND_EDITION_NOT_ALLOWED_BY_SDK_LIMITATION_MESSAGE = "This place was created with the SDK an |
| | 88 | | public const float CACHE_TIME_LAND = 5 * 60; |
| | 89 | | public const float CACHE_TIME_SCENES = 1 * 60; |
| | 90 | | public const float REFRESH_LANDS_WITH_ACCESS_INTERVAL = 2 * 60; |
| | 91 | | public const float LAND_NOTIFICATIONS_TIMER = 10f; |
| | 92 | | public const float LAND_CHECK_MESSAGE_TIMER = 5f; |
| | 93 | | } |
| | 94 | |
|
| | 95 | | public static class ApplicationSettings |
| | 96 | | { |
| | 97 | | public static string version = "1.0"; |
| | 98 | | } |
| | 99 | |
|
| | 100 | | public static class EnvironmentSettings |
| | 101 | | { |
| | 102 | | public static bool RUNNING_TESTS = false; |
| | 103 | | public static bool DEBUG = true; |
| | 104 | | public static readonly Vector3 MORDOR = new Vector3(10000, 10000, 10000); |
| | 105 | | public static readonly int MORDOR_SCALAR = 10000; |
| | 106 | | public const float UNINITIALIZED_FLOAT = 999999f; |
| | 107 | | public static readonly string AVATAR_GLOBAL_SCENE_ID = "dcl-gs-avatars"; |
| | 108 | | } |
| | 109 | |
|
| | 110 | | public static class InputSettings |
| | 111 | | { |
| | 112 | | public static KeyCode PrimaryButtonKeyCode = KeyCode.E; |
| | 113 | | public static KeyCode SecondaryButtonKeyCode = KeyCode.F; |
| | 114 | | public static KeyCode ForwardButtonKeyCode = KeyCode.W; |
| | 115 | | public static KeyCode BackwardButtonKeyCode = KeyCode.S; |
| | 116 | | public static KeyCode LeftButtonKeyCode = KeyCode.A; |
| | 117 | | public static KeyCode RightButtonKeyCode = KeyCode.D; |
| | 118 | | public static KeyCode ForwardButtonKeyCodeAlt = KeyCode.UpArrow; |
| | 119 | | public static KeyCode BackwardButtonKeyCodeAlt = KeyCode.DownArrow; |
| | 120 | | public static KeyCode LeftButtonKeyCodeAlt = KeyCode.LeftArrow; |
| | 121 | | public static KeyCode RightButtonKeyCodeAlt = KeyCode.RightArrow; |
| | 122 | | public static KeyCode JumpButtonKeyCode = KeyCode.Space; |
| | 123 | | public static KeyCode WalkButtonKeyCode = KeyCode.LeftShift; |
| | 124 | | public static KeyCode PlusKeyCode = KeyCode.KeypadPlus; |
| | 125 | | public static KeyCode MinusKeyCode = KeyCode.KeypadMinus; |
| | 126 | | public static KeyCode ActionButton3Keycode = KeyCode.Alpha1; |
| | 127 | | public static KeyCode ActionButton4Keycode = KeyCode.Alpha2; |
| | 128 | | public static KeyCode ActionButton5Keycode = KeyCode.Alpha3; |
| | 129 | | public static KeyCode ActionButton6Keycode = KeyCode.Alpha4; |
| | 130 | | } |
| | 131 | |
|
| | 132 | | public static class PlayerSettings |
| | 133 | | { |
| | 134 | | public static float POSITION_REPORTING_DELAY = 0.1f; // In seconds |
| | 135 | | public static float WORLD_REPOSITION_MINIMUM_DISTANCE = 100f; |
| | 136 | | } |
| | 137 | |
|
| | 138 | | public static class ParcelSettings |
| | 139 | | { |
| | 140 | | public static float DEBUG_FLOOR_HEIGHT = -0.1f; |
| | 141 | | public static float PARCEL_SIZE = 16f; |
| | 142 | | public static float PARCEL_BOUNDARIES_THRESHOLD = 0.01f; |
| | 143 | | public static float UNLOAD_DISTANCE = PARCEL_SIZE * 12f; |
| | 144 | | public static bool VISUAL_LOADING_ENABLED = true; |
| | 145 | | } |
| | 146 | |
|
| | 147 | | public static class TestSettings |
| | 148 | | { |
| | 149 | | public static int VISUAL_TESTS_APPROVED_AFFINITY = 95; |
| | 150 | | public static float VISUAL_TESTS_PIXELS_CHECK_THRESHOLD = 5.0f; |
| | 151 | | public static int VISUAL_TESTS_SNAPSHOT_WIDTH = 1280; |
| | 152 | | public static int VISUAL_TESTS_SNAPSHOT_HEIGHT = 720; |
| | 153 | | } |
| | 154 | |
|
| | 155 | | public static class AssetManagerSettings |
| | 156 | | { |
| | 157 | | //When library item count gets above this threshold, unused items will get pruned on Get() method. |
| | 158 | | public static int LIBRARY_CLEANUP_THRESHOLD = 10; |
| | 159 | | } |
| | 160 | |
|
| | 161 | | public static class MessageThrottlingSettings |
| | 162 | | { |
| | 163 | | public static float SIXTY_FPS_TIME = 1.0f / 60.0f; |
| | 164 | | public static float GLOBAL_FRAME_THROTTLING_TIME = SIXTY_FPS_TIME / 8.0f; |
| | 165 | | public static float LOAD_PARCEL_SCENES_THROTTLING_TIME = SIXTY_FPS_TIME / 4.0f; |
| | 166 | | } |
| | 167 | |
|
| | 168 | | public static class UISettings |
| | 169 | | { |
| | 170 | | public static float RESERVED_CANVAS_TOP_PERCENTAGE = 10f; |
| | 171 | | } |
| | 172 | |
|
| | 173 | | public static class NFTDataFetchingSettings |
| | 174 | | { |
| | 175 | | public static UnityEngine.Vector2 |
| | 176 | | NORMALIZED_DIMENSIONS = |
| | 177 | | new UnityEngine.Vector2(512f, 512f); // The image dimensions that correspond to Vector3.One scale |
| | 178 | |
|
| | 179 | | public static string DAR_API_URL = "https://schema.decentraland.org/dar"; |
| | 180 | | } |
| | 181 | |
|
| | 182 | | public static class PhysicsLayers |
| | 183 | | { |
| 1 | 184 | | public static int defaultLayer = LayerMask.NameToLayer("Default"); |
| 1 | 185 | | public static int onPointerEventLayer = LayerMask.NameToLayer("OnPointerEvent"); |
| 1 | 186 | | public static int characterLayer = LayerMask.NameToLayer("CharacterController"); |
| 1 | 187 | | public static int characterOnlyLayer = LayerMask.NameToLayer("CharacterOnly"); |
| 1 | 188 | | public static LayerMask physicsCastLayerMask = 1 << onPointerEventLayer; |
| | 189 | |
|
| 1 | 190 | | public static LayerMask physicsCastLayerMaskWithoutCharacter = (physicsCastLayerMask | (1 << defaultLayer)) |
| | 191 | | & ~(1 << characterLayer) |
| | 192 | | & ~(1 << characterOnlyLayer); |
| | 193 | |
|
| 1 | 194 | | public static int friendsHUDPlayerMenu = LayerMask.NameToLayer("FriendsHUDPlayerMenu"); |
| 1 | 195 | | public static int playerInfoCardMenu = LayerMask.NameToLayer("PlayerInfoCardMenu"); |
| 1 | 196 | | public static int avatarTriggerMask = LayerMask.GetMask("AvatarTriggerDetection"); |
| | 197 | | } |
| | 198 | | } |