Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeSmile-0000011110110111 committed Feb 1, 2024
1 parent 584ac24 commit d4264f1
Show file tree
Hide file tree
Showing 34 changed files with 2,566 additions and 2,236 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Change Log

#### v1.9.0 - Jan 31, 2024
#### v1.9.1 - Feb 01, 2024

- API Changes: These static methods have been MOVED from **Asset** to **Asset.File**:
- GetMainType
- GetSubType
- GetGuid
- GetFileId
- GetGuidAndFileId
- Rationale: These methods hindered API discovery via auto-completion by cluttering the Asset namespace, and they truly belong to the File API since they query asset file attributes.
- Rationale: These methods hindered API discovery via auto-completion by cluttering the Asset namespace, and they truly belong to the File API since they query asset file attributes.
- Fixed: 2021.3 shows warning when copying (duplicate, save as new) an asset, complaining that filename must match asset object name. This is likely a bug in Unity.
- Fixed the same 2021.3 issue in workflow sample. Also required importing batched asset after copying them.
- Asset.File.Import takes IEnumerable as input (not just array)

#### v1.8.6 - Jan 30, 2024

Expand Down
73 changes: 41 additions & 32 deletions Docs~/html/_asset_8_file_8cs_source.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a7c993d64861e62fbdcff3700
</div><div class="memdoc">

<p>Scans for <b>external</b> file system modifications and updates the Database accordingly. Prefer to use <a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_ae11a13bfe131ec8b20a5a5667e75ec97.html#ae11a13bfe131ec8b20a5a5667e75ec97" title="Imports a file at a given path that was created or modified &#39;externally&#39;. Externally refers to any me...">CodeSmileEditor.Asset.File.Import</a> within <a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_ab0082c2158f7de6376b26a75827bd7a2.html#ab0082c2158f7de6376b26a75827bd7a2" title="Batch multiple asset file operations to improve execution speed.">CodeSmileEditor.Asset.File.BatchEditing</a>. <b>CAUTION</b>: ImportAll ('Refresh') unloads unused resources. This can degrade editor performance! </p>
<p>For best performance, prefer to use <a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_a39290f9fb99198f7df818bc5cafb0e1a.html#a39290f9fb99198f7df818bc5cafb0e1a" title="Imports multiple paths that were created or modified &#39;externally&#39;. Externally refers to any means oth...">CodeSmileEditor.Asset.File.Import(String[],ImportAssetOptions)</a> to import multiple assets in a batch operation. </p>
<p>For best performance, prefer to use CodeSmileEditor.Asset.File.Import(String[],ImportAssetOptions) to import multiple assets in a batch operation. </p>
<p>When to call ImportAll (same as AssetDatabase.Refresh):</p><ul>
<li>After System.IO.File/Directory or similar methods modified files/folders in the project.</li>
<li>After running an external process that possibly modified files/folders in the project. There is no need to call ImportAll / 'Refresh' in any other situation! </li>
Expand All @@ -143,7 +143,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a7c993d64861e62fbdcff3700
</dl>
<dl class="section see"><dt>See also</dt><dd></dd></dl>
<ul>
<li><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_a39290f9fb99198f7df818bc5cafb0e1a.html#a39290f9fb99198f7df818bc5cafb0e1a" title="Imports multiple paths that were created or modified &#39;externally&#39;. Externally refers to any means oth...">CodeSmileEditor.Asset.File.Import(String[],ImportAssetOptions)</a></li>
<li>CodeSmileEditor.Asset.File.Import(String[],ImportAssetOptions)</li>
<li><a href="https://docs.unity3d.com/ScriptReference/AssetDatabase.Refresh.html">AssetDatabase.Refresh</a> </li>
</ul>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@
<tr class="even"><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_a82b0bb0beb5f5422951631789bca4256.html#a82b0bb0beb5f5422951631789bca4256">GetMainType</a>(GUID guid)</td><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file.html">Asset.File</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_ab9e60595a8cc5748f38f91b3ed83aeca.html#ab9e60595a8cc5748f38f91b3ed83aeca">GetSubType</a>([NotNull] Path path, Int64 fileId)</td><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file.html">Asset.File</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_ae11a13bfe131ec8b20a5a5667e75ec97.html#ae11a13bfe131ec8b20a5a5667e75ec97">Import</a>([NotNull] Path path, ImportAssetOptions options=ImportAssetOptions.Default)</td><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file.html">Asset.File</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_ae3c1d18d1f26557851b440b5704d2188.html#ae3c1d18d1f26557851b440b5704d2188">Import</a>([NotNull] Path[] paths, ImportAssetOptions options=ImportAssetOptions.Default)</td><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file.html">Asset.File</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_a39290f9fb99198f7df818bc5cafb0e1a.html#a39290f9fb99198f7df818bc5cafb0e1a">Import</a>([NotNull] String[] paths, ImportAssetOptions options=ImportAssetOptions.Default)</td><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file.html">Asset.File</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_af2ccad52b2993c46962c3dea1c2ef54d.html#af2ccad52b2993c46962c3dea1c2ef54d">Import</a>([NotNull] IEnumerable&lt; Path &gt; paths, ImportAssetOptions options=ImportAssetOptions.Default)</td><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file.html">Asset.File</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_aff6427c4b634d2e4ff4d23995a3319f0.html#aff6427c4b634d2e4ff4d23995a3319f0">Import</a>([NotNull] IEnumerable&lt; string &gt; paths, ImportAssetOptions options=ImportAssetOptions.Default)</td><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file.html">Asset.File</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_a4dc6aff1e32f03b26ec0e310fb4233c0.html#a4dc6aff1e32f03b26ec0e310fb4233c0">ImportAndLoad&lt; T &gt;</a>([NotNull] Path path, ImportAssetOptions options=ImportAssetOptions.Default)</td><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file.html">Asset.File</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_a4f89e334c74903942522d0e0066d28b7.html#a4f89e334c74903942522d0e0066d28b7">Load&lt; T &gt;</a>([NotNull] Path path)</td><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file.html">Asset.File</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_a1de889c18256fc25aa6f53507d448050.html#a1de889c18256fc25aa6f53507d448050">LoadAsync</a>([NotNull] Path path, Int64 localFileId)</td><td class="entry"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file.html">Asset.File</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
Expand Down
12 changes: 6 additions & 6 deletions Docs~/html/class_code_smile_editor_1_1_asset_1_1_file.html
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,15 @@
<tr class="memitem:ab9e60595a8cc5748f38f91b3ed83aeca" id="r_ab9e60595a8cc5748f38f91b3ed83aeca"><td class="memItemLeft" align="right" valign="top">static Type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_ab9e60595a8cc5748f38f91b3ed83aeca.html#ab9e60595a8cc5748f38f91b3ed83aeca">GetSubType</a> ([NotNull] <a class="el" href="class_code_smile_editor_1_1_asset_1_1_path.html">Path</a> path, Int64 fileId)</td></tr>
<tr class="memdesc:ab9e60595a8cc5748f38f91b3ed83aeca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the type of a sub asset by the main asset's path and the local file ID of the sub-asset. <br /></td></tr>
<tr class="separator:ab9e60595a8cc5748f38f91b3ed83aeca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2ccad52b2993c46962c3dea1c2ef54d" id="r_af2ccad52b2993c46962c3dea1c2ef54d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_af2ccad52b2993c46962c3dea1c2ef54d.html#af2ccad52b2993c46962c3dea1c2ef54d">Import</a> ([NotNull] IEnumerable&lt; <a class="el" href="class_code_smile_editor_1_1_asset_1_1_path.html">Path</a> &gt; paths, ImportAssetOptions options=ImportAssetOptions.Default)</td></tr>
<tr class="memdesc:af2ccad52b2993c46962c3dea1c2ef54d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Imports multiple paths that were created or modified 'externally'. Externally refers to any means other than AssetDatabase methods such as System.IO or batch scripts. <br /></td></tr>
<tr class="separator:af2ccad52b2993c46962c3dea1c2ef54d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff6427c4b634d2e4ff4d23995a3319f0" id="r_aff6427c4b634d2e4ff4d23995a3319f0"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_aff6427c4b634d2e4ff4d23995a3319f0.html#aff6427c4b634d2e4ff4d23995a3319f0">Import</a> ([NotNull] IEnumerable&lt; string &gt; paths, ImportAssetOptions options=ImportAssetOptions.Default)</td></tr>
<tr class="memdesc:aff6427c4b634d2e4ff4d23995a3319f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Imports multiple paths that were created or modified 'externally'. Externally refers to any means other than AssetDatabase methods such as System.IO or batch scripts. <br /></td></tr>
<tr class="separator:aff6427c4b634d2e4ff4d23995a3319f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae11a13bfe131ec8b20a5a5667e75ec97" id="r_ae11a13bfe131ec8b20a5a5667e75ec97"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_ae11a13bfe131ec8b20a5a5667e75ec97.html#ae11a13bfe131ec8b20a5a5667e75ec97">Import</a> ([NotNull] <a class="el" href="class_code_smile_editor_1_1_asset_1_1_path.html">Path</a> path, ImportAssetOptions options=ImportAssetOptions.Default)</td></tr>
<tr class="memdesc:ae11a13bfe131ec8b20a5a5667e75ec97"><td class="mdescLeft">&#160;</td><td class="mdescRight">Imports a file at a given path that was created or modified 'externally'. Externally refers to any means other than AssetDatabase methods such as System.IO or batch scripts. <br /></td></tr>
<tr class="separator:ae11a13bfe131ec8b20a5a5667e75ec97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3c1d18d1f26557851b440b5704d2188" id="r_ae3c1d18d1f26557851b440b5704d2188"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_ae3c1d18d1f26557851b440b5704d2188.html#ae3c1d18d1f26557851b440b5704d2188">Import</a> ([NotNull] <a class="el" href="class_code_smile_editor_1_1_asset_1_1_path.html">Path</a>[] paths, ImportAssetOptions options=ImportAssetOptions.Default)</td></tr>
<tr class="memdesc:ae3c1d18d1f26557851b440b5704d2188"><td class="mdescLeft">&#160;</td><td class="mdescRight">Imports multiple paths that were created or modified 'externally'. Externally refers to any means other than AssetDatabase methods such as System.IO or batch scripts. <br /></td></tr>
<tr class="separator:ae3c1d18d1f26557851b440b5704d2188"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39290f9fb99198f7df818bc5cafb0e1a" id="r_a39290f9fb99198f7df818bc5cafb0e1a"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_a39290f9fb99198f7df818bc5cafb0e1a.html#a39290f9fb99198f7df818bc5cafb0e1a">Import</a> ([NotNull] String[] paths, ImportAssetOptions options=ImportAssetOptions.Default)</td></tr>
<tr class="memdesc:a39290f9fb99198f7df818bc5cafb0e1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Imports multiple paths that were created or modified 'externally'. Externally refers to any means other than AssetDatabase methods such as System.IO or batch scripts. <br /></td></tr>
<tr class="separator:a39290f9fb99198f7df818bc5cafb0e1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4dc6aff1e32f03b26ec0e310fb4233c0" id="r_a4dc6aff1e32f03b26ec0e310fb4233c0"><td class="memItemLeft" align="right" valign="top">static T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_a4dc6aff1e32f03b26ec0e310fb4233c0.html#a4dc6aff1e32f03b26ec0e310fb4233c0">ImportAndLoad&lt; T &gt;</a> ([NotNull] <a class="el" href="class_code_smile_editor_1_1_asset_1_1_path.html">Path</a> path, ImportAssetOptions options=ImportAssetOptions.Default)</td></tr>
<tr class="memdesc:a4dc6aff1e32f03b26ec0e310fb4233c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Imports a file at a given path that was created or modified 'externally', then loads and returns the asset object. See <a class="el" href="class_code_smile_editor_1_1_asset_1_1_file_ae11a13bfe131ec8b20a5a5667e75ec97.html#ae11a13bfe131ec8b20a5a5667e75ec97" title="Imports a file at a given path that was created or modified &#39;externally&#39;. Externally refers to any me...">CodeSmileEditor.Asset.File.Import</a> for more info. <br /></td></tr>
<tr class="separator:a4dc6aff1e32f03b26ec0e310fb4233c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
Expand Down
4 changes: 2 additions & 2 deletions Docs~/html/class_code_smile_editor_1_1_asset_1_1_file.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

<div class="contents">
<a id="ae11a13bfe131ec8b20a5a5667e75ec97" name="ae11a13bfe131ec8b20a5a5667e75ec97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae11a13bfe131ec8b20a5a5667e75ec97">&#9670;&#160;</a></span>Import() <span class="overload">[1/3]</span></h2>
<h2 class="memtitle"><span class="permalink"><a href="#ae11a13bfe131ec8b20a5a5667e75ec97">&#9670;&#160;</a></span>Import() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
Expand Down
Loading

0 comments on commit d4264f1

Please sign in to comment.