private Api(string apiKey, CoordinateSystem coordinateSystem, Transform parentTransformForStreamedObjects, ConfigParams configParams) { if (!APIKeyPrevalidator.AppearsValid(apiKey)) { throw new InvalidApiKeyException(string.Format(InvalidApiKeyExceptionMessage, apiKey)); } try { m_implementation = new ApiImplementation(apiKey, coordinateSystem, parentTransformForStreamedObjects, configParams); } catch (DllNotFoundException dllNotFound) { bool couldNotFindWRLDBinary = dllNotFound.Message.ToLower().Contains("streamalpha"); bool is32Bit = IntPtr.Size == 4; if (couldNotFindWRLDBinary && is32Bit) { var guiTextObject = new GameObject("OtherErrorMessage"); var errorMessage = guiTextObject.AddComponent <ErrorMessage>(); errorMessage.Title = "WRLD Error: Unsupported Build Architecture"; errorMessage.Text = "It looks like you're trying to run a 32 bit build of the game. Unfortunately that isn't currently supported.\n\n" + "Please go to 'File->Build Settings' in the Unity menu and select 'x86_64' as your Architecture to continue."; } else { throw; } } }
public override void OnInspectorGUI() { serializedObject.Update(); EditorGUILayout.PropertyField(m_apiKey, new GUIContent("API Key")); if (!APIKeyPrevalidator.AppearsValid(m_apiKey.stringValue)) { EditorGUILayout.HelpBox("You must have an API key!", MessageType.Error); if (GUILayout.Button("Get an API key from wrld3d.com")) { Application.OpenURL("https://wrld3d.com/register?utm_source=UnitySDK&utm_medium=UnityEditor"); } } else { if (QualitySettings.shadowDistance < Wrld.Constants.RecommendedShadowDistance) { EditorGUILayout.HelpBox("Your Shadow Distance setting is below the recommended value. Shadows may not display correctly.", MessageType.Warning); if (GUILayout.Button("Use recommended value")) { QualitySettings.shadowDistance = Wrld.Constants.RecommendedShadowDistance; } } EditorGUILayout.PropertyField(m_streamingCamera, new GUIContent("Camera")); EditorGUILayout.PropertyField(m_useBuiltInCameraControls, new GUIContent("Use Built-in Camera Controls")); EditorGUILayout.PropertyField(m_latitudeDegrees, new GUIContent("Start Latitude")); EditorGUILayout.PropertyField(m_longitudeDegrees, new GUIContent("Start Longitude")); if (m_useBuiltInCameraControls.boolValue) { EditorGUILayout.PropertyField(m_distanceToInterest, new GUIContent("Starting Distance To Interest Point")); EditorGUILayout.PropertyField(m_headingDegrees, new GUIContent("Start Heading")); } EditorGUILayout.PropertyField(m_coordSystem, new GUIContent("World Space")); EditorGUILayout.PropertyField(m_terrainCollisions, new GUIContent("Terrain Colisions")); EditorGUILayout.PropertyField(m_roadCollisions, new GUIContent("Road Collisions")); EditorGUILayout.PropertyField(m_buildingCollisions, new GUIContent("Building Collisions")); EditorGUILayout.PropertyField(m_materialDirectory, new GUIContent("Material Directory")); EditorGUILayout.PropertyField(m_overrideLandmarkMaterial, new GUIContent("Landmark Override Material")); if (GUILayout.Button("Provide Feedback")) { Application.OpenURL("https://docs.google.com/a/eegeo.com/forms/d/e/1FAIpQLSe_QJz3sqn7Xs-yiMw94JTdQiZ4Nq-50FYMRD21th0ZHMPEmQ/viewform"); } } serializedObject.ApplyModifiedProperties(); }