Skip to content

Commit 620964f

Browse files
committed
Last bit of renaming
1 parent f9a03c6 commit 620964f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+112
-104
lines changed

Packages/icosa-api-client-unity/Editor/AssetBrowser/AssetBrowserWindow.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ public void OnGUI()
375375
Initialize();
376376
}
377377

378-
// We have to check if Icosa is ready every time (it's cheap to check). This is because Poly can be
378+
// We have to check if Icosa is ready every time (it's cheap to check). This is because the Icosa Client can be
379379
// unloaded and wiped every time we enter or exit play mode.
380380
manager.EnsureIcosaIsReady();
381381

Packages/icosa-api-client-unity/Editor/CheckBuild.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ private static void CheckApiCompatibilitySetting()
4646
{
4747
EditorUtility.DisplayDialog("API Compatibility", "Warning: You are building for the IL2CPP script " +
4848
"backend (AOT compilation) and have '.NET 2.0 Subset' selected as API compatibility level.\n\n" +
49-
"Poly Toolkit runtime needs '.NET 2.0' (full) when compiling for IL2CPP, or runtime errors " +
49+
"Icosa CLient runtime needs '.NET 2.0' (full) when compiling for IL2CPP, or runtime errors " +
5050
"may occur.\n\n" +
5151
"If you see problems, go to Player Settings and change your API compatibility level " +
5252
"to '.NET 2.0', and try to build again.\n\n" +
53-
"(You can silence this warning in Poly Toolkit settings if it's not useful)",
53+
"(You can silence this warning in Icosa Client settings if it's not useful)",
5454
"OK");
5555
}
5656
}

Packages/icosa-api-client-unity/Editor/PostInstallHandler.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ static PostInstallHandler()
2727
{
2828
if (Application.isPlaying) return;
2929

30-
// Don't run the upgrade logic in the Poly Toolkit source project. We only want it to run
30+
// Don't run the upgrade logic in the source project. We only want it to run
3131
// when users have installed it.
32-
if (Application.companyName == "Google" && Application.productName == "PolyToolkitUnity") return;
32+
if (Application.companyName == "Icosa Foundation" && Application.productName == "Icosa API Client Unity") return;
3333

3434
// Add HandlePostInstall method to the Editor update loop so it runs after the rest of
35-
// PolyToolkit has been initialized.
35+
// Icosa Client has been initialized.
3636
EditorApplication.update += HandlePostInstall;
3737
}
3838

@@ -41,7 +41,7 @@ public static void HandlePostInstall()
4141
// Remove from the Editor update loop; we only need this to run once.
4242
EditorApplication.update -= HandlePostInstall;
4343

44-
// Check if user just installed or upgraded Poly Toolkit.
44+
// Check if user just installed or upgraded Icosa Client.
4545
string basePath = PtUtils.GetPtBaseLocalPath();
4646
string upgradeFilePath = PtUtils.ToAbsolutePath(basePath + "/upgrade.dat");
4747
string currentVersion = "";

Packages/icosa-api-client-unity/Editor/PtSettingsEditor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public override void OnInspectorGUI()
8888
serializedObject.ApplyModifiedProperties();
8989
}
9090

91-
[MenuItem("Icosa/Poly Toolkit Settings...", priority = 1000)]
91+
[MenuItem("Icosa/Icosa API Client Settings...", priority = 1000)]
9292
public static void ShowIcosaClientSettings()
9393
{
9494
Selection.activeObject = PtSettings.Instance;

Packages/icosa-api-client-unity/Editor/PtUtils.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ namespace IcosaClientEditor
2424
public static class PtUtils
2525
{
2626
/// <summary>
27-
/// Name of the Poly Toolkit manifest file.
27+
/// Name of the Icosa API Client manifest file.
2828
/// </summary>
2929
private const string MANIFEST_FILE_NAME = "icosa_toolkit_manifest.dat";
3030

3131
/// <summary>
32-
/// Poly Toolkit base path (normally Assets/PolyToolkit, unless the user moved it).
32+
/// Icosa API Client base path (normally Assets/PolyToolkit, unless the user moved it).
3333
/// This is computed lazily.
3434
/// </summary>
3535
private static string basePath = null;
@@ -118,7 +118,7 @@ public static string GetPtBaseLocalPath()
118118
if (basePath != null) return basePath;
119119
// Get the root path of the project. Something like C:\Foo\Bar\MyUnityProject
120120
string rootPath = Path.GetDirectoryName(Application.dataPath);
121-
// Find the icosa_toolkit_manifest.data file. That marks the installation path of Poly Toolkit.
121+
// Find the icosa_toolkit_manifest.data file. That marks the installation path of Icosa API Client.
122122
string[] matches = Directory.GetFiles(Path.Combine(Application.dataPath, "../Packages"), MANIFEST_FILE_NAME,
123123
SearchOption.AllDirectories);
124124
if (matches == null || matches.Length == 0)
@@ -129,7 +129,7 @@ public static string GetPtBaseLocalPath()
129129
else if (matches.Length > 1)
130130
{
131131
Debug.LogError(
132-
"Found more than one Poly Toolkit installation in your project. Make sure there is only one.");
132+
"Found more than one Icosa API Client installation in your project. Make sure there is only one.");
133133
// Continue anyway (by "best effort" -- arbitrarily use the first one).
134134
}
135135

@@ -139,8 +139,8 @@ public static string GetPtBaseLocalPath()
139139
if (!rootPath.EndsWith("/")) rootPath += "/";
140140
string manifestPath = matches[0].Replace('\\', '/').Replace(MANIFEST_FILE_NAME, "");
141141
// Now rootPath is something like "C:/Foo/Bar/MyUnityProject/"
142-
// and manifestPath is something like "C:/Foo/Bar/MyUnityProject/Some/Path/PolyToolkit".
143-
// We want to extract the "Some/Path/PolyToolkit" part.
142+
// and manifestPath is something like "C:/Foo/Bar/MyUnityProject/Some/Path/IcosaClient".
143+
// We want to extract the "Some/Path/IcosaClient" part.
144144
if (!manifestPath.StartsWith(rootPath))
145145
{
146146
throw new System.Exception(string.Format("Could not find local path from '{0}' (data path is '{1}')",
@@ -154,11 +154,11 @@ public static string GetPtBaseLocalPath()
154154
}
155155

156156
/// <summary>
157-
/// Loads a texture file from the Poly Toolkit installation folder given a relative path
157+
/// Loads a texture file from the Icosa API Client installation folder given a relative path
158158
/// from the installation folder to the texture.
159159
/// </summary>
160160
/// <param name="relativePath">The relative path were the texture is located. For example,
161-
/// this could be Editor/Textures/PolyToolkitTitle.png.</param>
161+
/// this could be Editor/Textures/IcosaClientTitle.png.</param>
162162
/// <returns>The texture.</returns>
163163
public static Texture2D LoadTexture2DFromRelativePath(string relativePath)
164164
{

Packages/icosa-api-client-unity/Runtime/Internal/AttributionGeneration.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static class AttributionGeneration
2222
/// <summary>
2323
/// Name of the static attribution file.
2424
/// </summary>
25-
public static readonly string ATTRIB_FILE_NAME = "PolyAttributions.txt";
25+
public static readonly string ATTRIB_FILE_NAME = "IcosaAttributions.txt";
2626

2727
/// <summary>
2828
/// File header.

Packages/icosa-api-client-unity/Runtime/Internal/Authenticator.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace IcosaClientInternal
2424
{
2525
/// <summary>
2626
/// Basic authentication module.
27-
/// This is exposed in the Poly Toolkit API through the Poly class. This is just the implementation.
27+
/// This is exposed in the Icosa API Client through the Icosa class. This is just the implementation.
2828
/// </summary>
2929
[ExecuteInEditMode]
3030
public class Authenticator : MonoBehaviour
@@ -138,7 +138,7 @@ public static void Initialize(IcosaAuthConfig config)
138138
{
139139
IcosaUtils.AssertTrue(instance == null, "Authenticator.Initialize called twice.");
140140

141-
GameObject hostObject = IcosaInternalUtils.CreateSingletonGameObject("PolyToolkit Authenticator");
141+
GameObject hostObject = IcosaInternalUtils.CreateSingletonGameObject("IcosaClient Authenticator");
142142
instance = hostObject.AddComponent<Authenticator>();
143143

144144
// Currently, authentication is only supported on Windows/Mac for now.

Packages/icosa-api-client-unity/Runtime/Internal/CoroutineRunner.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private void Tick()
137137

138138
using UnityEngine;
139139
using System.Collections;
140-
namespace PolyToolkitInternal {
140+
namespace IcosaClientInternal {
141141
public class CoroutineRunner {
142142
public static void StartCoroutine(MonoBehaviour host, IEnumerator coroutine) {
143143
host.StartCoroutine(coroutine);

Packages/icosa-api-client-unity/Runtime/Internal/EditTimeImportOptions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace IcosaClientInternal
2424
{
2525
/// <summary>
2626
/// Options that indicate how the user wants to import a given asset at edit time.
27-
/// This includes the options normally available for run-time importing (PolyImportOptions),
27+
/// This includes the options normally available for run-time importing (IcosaImportOptions),
2828
/// but adds some parameters that are only relevant to edit-time importing.
2929
/// </summary>
3030
[Serializable]

Packages/icosa-api-client-unity/Runtime/Internal/Gltf1Schema.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public override void Dereference(IUriLoader uriLoader = null, IcosaFormat gltfFo
121121
}
122122
else if (gltfFormat != null)
123123
{
124-
// Runtime import case; the uris refer to resource files in the PolyFormat.
124+
// Runtime import case; the uris refer to resource files in the IcosaFormat.
125125
Debug.Assert(buffer.type == "arraybuffer");
126126
foreach (IcosaFile resource in gltfFormat.resources)
127127
{

Packages/icosa-api-client-unity/Runtime/Internal/Gltf2Schema.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public override void Dereference(IUriLoader uriLoader = null, IcosaFormat gltfFo
117117
}
118118
else if (gltfFormat != null)
119119
{
120-
// Runtime import case; the uris refer to resource files in the PolyFormat.
120+
// Runtime import case; the uris refer to resource files in the IcosaFormat.
121121
foreach (IcosaFile resource in gltfFormat.resources)
122122
{
123123
if (resource.relativePath == buffer.uri)

Packages/icosa-api-client-unity/Runtime/Internal/IUriLoader.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public RawImage LoadAsImage(string uri)
276276

277277
// ----------------------------------------------------------------------
278278

279-
// Load "files" from a PolyFormat
279+
// Load "files" from a IcosaFormat
280280
public class FormatLoader : IUriLoader
281281
{
282282
private IcosaFormat format;

Packages/icosa-api-client-unity/Runtime/Internal/IcosaMainInternal.cs

+13-13
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,25 @@ public class IcosaMainInternal : MonoBehaviour
5757
public delegate void FetchProgressCallback(IcosaAsset asset, float progress0to1);
5858

5959
/// <summary>
60-
/// API key for use with the Poly server.
60+
/// API key for use with the Icosa server.
6161
/// </summary>
6262
public string apiKey { get; private set; }
6363

6464
public string apiKeyUrlParam => string.IsNullOrEmpty(apiKey) ? "" : $"key={apiKey}";
6565

6666
/// <summary>
67-
/// The web request manager, which handles any Poly web requests we need to make.
67+
/// The web request manager, which handles any Icosa web requests we need to make.
6868
/// </summary>
6969
public WebRequestManager webRequestManager { get; private set; }
7070

7171
/// <summary>
72-
/// The client we use to communicate with the Poly.
72+
/// The client we use to communicate with the Icosa.
7373
/// </summary>
7474
public IcosaClient IcosaClient { get; private set; }
7575

7676
/// <summary>
77-
/// Access token for Poly API access.
78-
/// This can be manually set by the user by calling Poly.SetAccessToken. If unset, we will get access tokens
77+
/// Access token for Icosa API access.
78+
/// This can be manually set by the user by calling Icosa.SetAccessToken. If unset, we will get access tokens
7979
/// from Authenticator (default behaviour).
8080
/// </summary>
8181
private string manuallyProvidedAccessToken = null;
@@ -108,12 +108,12 @@ public static bool IsInitialized
108108
}
109109

110110
/// <summary>
111-
/// Initializes Poly Toolkit runtime. Must be called once, before any other use of the library.
112-
/// Call only once in your app's lifetime, not once per scene (Poly Toolkit survives scene loads).
111+
/// Initializes Icosa API Client runtime. Must be called once, before any other use of the library.
112+
/// Call only once in your app's lifetime, not once per scene (Icosa API Client survives scene loads).
113113
/// </summary>
114114
public static void Init(IcosaAuthConfig? authConfig, IcosaCacheConfig? cacheConfig)
115115
{
116-
string objName = Application.isPlaying ? "Poly Main" : "Poly Main (EDITOR)";
116+
string objName = Application.isPlaying ? "Icosa Main" : "Icosa Main (EDITOR)";
117117
IcosaUtils.AssertTrue(instance == null,
118118
"IcosaMainInternal.Init() already called. Can only be called once.");
119119

@@ -137,7 +137,7 @@ private void Setup(IcosaAuthConfig? authConfig, IcosaCacheConfig? cacheConfig)
137137
// // Check that the user actually set up their API key in authConfig, and didn't just leave the default
138138
// // value in (the placeholder value starts with "**" so that's what we check for).
139139
// if (string.IsNullOrEmpty(authConfig.Value.apiKey) || authConfig.Value.apiKey.StartsWith("**")) {
140-
// throw new System.Exception("API Key not configured. Set your API key in in Poly Toolkit " +
140+
// throw new System.Exception("API Key not configured. Set your API key in Icosa API Client " +
141141
// "Settings ('Runtime' section).");
142142
// }
143143

@@ -206,7 +206,7 @@ public void ListUserAssets(IcosaListUserAssetsRequest listUserAssetsRequest,
206206
IcosaApi.ListAssetsCallback callback)
207207
{
208208
// Users expect their own private assets to update quickly once they make a change (one use case
209-
// being: I go to Blocks or Tilt Brush, modify my asset, come back to PolyToolkit, I expect it to be updated).
209+
// being: I go to Blocks or Tilt Brush, modify my asset, come back to Icosa Client, I expect it to be updated).
210210
// So we don't use caching for these.
211211
IcosaClient.SendRequest(listUserAssetsRequest,
212212
(IcosaStatus status, IcosaListAssetsResult icosaListResult) =>
@@ -243,7 +243,7 @@ public void ListLikedAssets(IcosaListLikedAssetsRequest listLikedAssetsRequest,
243243
}
244244

245245
/// <summary>
246-
/// Fetch a specific Poly asset.
246+
/// Fetch a specific Icosa asset.
247247
/// </summary>
248248
/// <param name="id">The ID of the sought asset.</param>
249249
/// <param name="callback">The callback.</param>
@@ -263,7 +263,7 @@ public void GetAsset(string id, IcosaApi.GetAssetCallback callback)
263263
}
264264

265265
/// <summary>
266-
/// As documented in PolyApi.FetchThumbnails.
266+
/// As previously documented in PolyApi.FetchThumbnails.
267267
/// </summary>
268268
public void FetchThumbnail(IcosaAsset asset, IcosaFetchThumbnailOptions options,
269269
IcosaApi.FetchThumbnailCallback callback)
@@ -274,7 +274,7 @@ public void FetchThumbnail(IcosaAsset asset, IcosaFetchThumbnailOptions options,
274274
}
275275

276276
/// <summary>
277-
/// As documented in PolyApi.ClearCache.
277+
/// As previously documented in PolyApi.ClearCache.
278278
/// </summary>
279279
public void ClearCache()
280280
{

Packages/icosa-api-client-unity/Runtime/Internal/ImportGltf.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,15 @@ private static void SanityCheckImportOptions(IcosaImportOptions options)
174174
options.scaleFactor == 0.0f)
175175
{
176176
// If scaleFactor is exactly zero (not just close), it's PROBABLY because of user error,
177-
// because this is what happens when you do "new PolyImportOptions()" and forget to set
178-
// scaleFactor. PolyImportOptions is a struct so we can't have a default value.
179-
throw new Exception("scaleFactor must be != 0 for PolyImportOptions CONVERT mode. " +
177+
// because this is what happens when you do "new IcosaImportOptions()" and forget to set
178+
// scaleFactor. IcosaImportOptions is a struct so we can't have a default value.
179+
throw new Exception("scaleFactor must be != 0 for IcosaImportOptions CONVERT mode. " +
180180
"Did you forget to set scaleFactor?");
181181
}
182182
else if (options.rescalingMode == IcosaImportOptions.RescalingMode.FIT &&
183183
options.desiredSize <= 0.0f)
184184
{
185-
throw new Exception("desiredSize must be > 0 for PolyImportOptions FIT mode. " +
185+
throw new Exception("desiredSize must be > 0 for IcosaImportOptions FIT mode. " +
186186
"Did you forget to set desiredSize?");
187187
}
188188
}
@@ -223,7 +223,7 @@ public static ImportState BeginImport(
223223
// Allow the glTF to define the limit of PT's data forward-compatibility
224224
if (root.asset.extras != null)
225225
{
226-
root.asset.extras.TryGetValue("requiredPolyToolkitVersion", out object tempOutVal);
226+
root.asset.extras.TryGetValue("requiredIcosaClientVersion", out object tempOutVal);
227227
string requiredPtVersion = tempOutVal?.ToString() ?? "";
228228
if (requiredPtVersion != null)
229229
{
@@ -238,7 +238,7 @@ public static ImportState BeginImport(
238238
if (required > PtSettings.Version)
239239
{
240240
Debug.LogWarningFormat(
241-
"This file requires Poly Toolkit {0}; you are currently using {1}",
241+
"This file requires Icosa API Client {0}; you are currently using {1}",
242242
required, PtSettings.Version);
243243
}
244244
}
@@ -459,7 +459,7 @@ static public GltfImportResult EndImport(
459459
{
460460
var result = new GltfImportResult
461461
{
462-
root = new GameObject("PolyImport"),
462+
root = new GameObject("IcosaImport"),
463463
meshes = new List<Mesh>(),
464464
};
465465
meshCreator = CreateGameObjectsFromNodes(state, result, uriLoader);

Packages/icosa-api-client-unity/Runtime/Internal/PtDebug.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ namespace IcosaClientInternal
1919
public static class PtDebug
2020
{
2121
/// <summary>
22-
/// Set this to true to have Poly Toolkit print debug logs.
22+
/// Set this to true to have Icosa Client print debug logs.
2323
/// </summary>
2424
public const bool DEBUG_LOG = false;
2525

2626
/// <summary>
27-
/// Set this to true (in addition to DEBUG_LOG) to have Poly Toolkit print very verbose debug logs.
27+
/// Set this to true (in addition to DEBUG_LOG) to have Icosa Client print very verbose debug logs.
2828
/// </summary>
2929
public const bool DEBUG_LOG_VERBOSE = false;
3030

0 commit comments

Comments
 (0)