<?xml version="1.0" encoding="utf-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>Kalet的技术文档</title><link>https://www.kalet.cn/</link><description>Kalet的技术文档，涉及.NET、Andriod、Arduino、Python的软件开发，所有资料均从网络复制，版权归原著者所有。</description><item><title>用AssetBundle打包整个目录的资源并调用</title><link>https://www.kalet.cn/post/904.html</link><description>&lt;h3 style=&quot;margin: 11px 0px 6px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; line-height: 30px; font-size: 18px; -webkit-text-stroke-color: initial; font-family: &amp;quot;PingFang SC&amp;quot;, Arial, sans-serif; color: rgb(51, 51, 51); text-wrap: wrap; background-color: rgb(255, 255, 255);&quot;&gt;一、打包整个目录资源&lt;/h3&gt;&lt;ol style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p class=&quot;marklang-paragraph&quot; style=&quot;margin-top: 7px; margin-bottom: 7px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; font-size: var(--cos-text-body-lg); line-height: 29px; -webkit-text-stroke-color: initial; color: var(--cos-color-text); font-weight: var(--cos-font-regular);&quot;&gt;‌&lt;span style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; -webkit-text-stroke: var(--cos-font-medium-stroke); font-weight: 600 !important;&quot;&gt;设置AssetBundle名称&lt;/span&gt;‌&lt;/p&gt;&lt;/li&gt;&lt;ul style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;使用编辑器脚本批量设置目录下资源的&lt;code style=&quot;margin: 0px 4px; padding: 1px 4px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background: var(--cos-color-border-minor); border-radius: 6px; color: var(--cos-color-text);&quot;&gt;AssetBundle&lt;/code&gt;属性，通过遍历目录文件实现自动化‌&lt;span disable-audio=&quot;true&quot; disable-copy=&quot;true&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;margin-top: 12px; margin-bottom: 12px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background-color: rgba(245, 246, 249, 0.5); line-height: 24px; border-radius: var(--cos-rounded-sm);&quot;&gt;[MenuItem(&amp;quot;Tools/Set&amp;nbsp;Directory&amp;nbsp;Bundle&amp;nbsp;Name&amp;quot;)]
static&amp;nbsp;void&amp;nbsp;SetBundleName()
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string&amp;nbsp;dirPath&amp;nbsp;=&amp;nbsp;&amp;quot;Assets/Resources/Weapons&amp;quot;;&amp;nbsp;//&amp;nbsp;目标目录路径
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;assets&amp;nbsp;=&amp;nbsp;AssetDatabase.FindAssets(&amp;quot;&amp;quot;,&amp;nbsp;new[]&amp;nbsp;{&amp;nbsp;dirPath&amp;nbsp;});
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach&amp;nbsp;(var&amp;nbsp;guid&amp;nbsp;in&amp;nbsp;assets)&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string&amp;nbsp;path&amp;nbsp;=&amp;nbsp;AssetDatabase.GUIDToAssetPath(guid);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AssetImporter.GetAtPath(path).assetBundleName&amp;nbsp;=&amp;nbsp;&amp;quot;weapons_bundle&amp;quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
}&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;p class=&quot;marklang-paragraph&quot; style=&quot;margin-top: 7px; margin-bottom: 7px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; font-size: var(--cos-text-body-lg); line-height: 29px; -webkit-text-stroke-color: initial; color: var(--cos-color-text); font-weight: var(--cos-font-regular);&quot;&gt;‌&lt;span style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; -webkit-text-stroke: var(--cos-font-medium-stroke); font-weight: 600 !important;&quot;&gt;执行打包操作&lt;/span&gt;‌&lt;/p&gt;&lt;/li&gt;&lt;ul style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;在&lt;code style=&quot;margin: 0px 4px; padding: 1px 4px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background: var(--cos-color-border-minor); border-radius: 6px; color: var(--cos-color-text);&quot;&gt;Editor&lt;/code&gt;目录下创建打包脚本，使用&lt;code style=&quot;margin: 0px 4px; padding: 1px 4px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background: var(--cos-color-border-minor); border-radius: 6px; color: var(--cos-color-text);&quot;&gt;BuildPipeline.BuildAssetBundles&lt;/code&gt;生成Bundle‌&lt;span disable-audio=&quot;true&quot; disable-copy=&quot;true&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;margin-top: 12px; margin-bottom: 12px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background-color: rgba(245, 246, 249, 0.5); line-height: 24px; border-radius: var(--cos-rounded-sm);&quot;&gt;[MenuItem(&amp;quot;Tools/Build&amp;nbsp;AssetBundles&amp;quot;)]
static&amp;nbsp;void&amp;nbsp;BuildBundles()
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string&amp;nbsp;outputPath&amp;nbsp;=&amp;nbsp;Path.Combine(Application.streamingAssetsPath,&amp;nbsp;&amp;quot;AssetBundles&amp;quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BuildPipeline.BuildAssetBundles(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;outputPath,&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BuildAssetBundleOptions.ChunkBasedCompression,&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BuildTarget.StandaloneWindows
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;);
}&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;p class=&quot;marklang-paragraph&quot; style=&quot;margin-top: 7px; margin-bottom: 7px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; font-size: var(--cos-text-body-lg); line-height: 29px; -webkit-text-stroke-color: initial; color: var(--cos-color-text); font-weight: var(--cos-font-regular);&quot;&gt;‌&lt;span style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; -webkit-text-stroke: var(--cos-font-medium-stroke); font-weight: 600 !important;&quot;&gt;生成依赖关系&lt;/span&gt;‌&lt;/p&gt;&lt;/li&gt;&lt;ul style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;打包完成后自动生成主包&lt;code style=&quot;margin: 0px 4px; padding: 1px 4px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background: var(--cos-color-border-minor); border-radius: 6px; color: var(--cos-color-text);&quot;&gt;AssetBundles.manifest&lt;/code&gt;，记录所有Bundle的依赖链‌&lt;span disable-audio=&quot;true&quot; disable-copy=&quot;true&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;hr style=&quot;margin: 12px 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background-color: rgb(255, 255, 255); border: none; height: 1px; position: relative; width: auto; color: rgb(51, 51, 51); font-family: &amp;quot;PingFang SC&amp;quot;, Arial, sans-serif; font-size: 16px; text-wrap: wrap;&quot;/&gt;&lt;h3 style=&quot;margin: 11px 0px 6px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; line-height: 30px; font-size: 18px; -webkit-text-stroke-color: initial; font-family: &amp;quot;PingFang SC&amp;quot;, Arial, sans-serif; color: rgb(51, 51, 51); text-wrap: wrap; background-color: rgb(255, 255, 255);&quot;&gt;二、调用加载流程&lt;/h3&gt;&lt;ol style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p class=&quot;marklang-paragraph&quot; style=&quot;margin-top: 7px; margin-bottom: 7px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; font-size: var(--cos-text-body-lg); line-height: 29px; -webkit-text-stroke-color: initial; color: var(--cos-color-text); font-weight: var(--cos-font-regular);&quot;&gt;‌&lt;span style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; -webkit-text-stroke: var(--cos-font-medium-stroke); font-weight: 600 !important;&quot;&gt;加载AssetBundle文件&lt;/span&gt;‌&lt;/p&gt;&lt;/li&gt;&lt;ul style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;‌&lt;span style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; -webkit-text-stroke: var(--cos-font-medium-stroke); font-weight: 600 !important;&quot;&gt;本地加载&lt;/span&gt;‌：使用&lt;code style=&quot;margin: 0px 4px; padding: 1px 4px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background: var(--cos-color-border-minor); border-radius: 6px; color: var(--cos-color-text);&quot;&gt;LoadFromFile&lt;/code&gt;直接读取StreamingAssets目录下的Bundle‌&lt;span disable-audio=&quot;true&quot; disable-copy=&quot;true&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;margin-top: 12px; margin-bottom: 12px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background-color: rgba(245, 246, 249, 0.5); line-height: 24px; border-radius: var(--cos-rounded-sm);&quot;&gt;AssetBundle&amp;nbsp;bundle&amp;nbsp;=&amp;nbsp;AssetBundle.LoadFromFile(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Path.Combine(Application.streamingAssetsPath,&amp;nbsp;&amp;quot;AssetBundles/weapons_bundle&amp;quot;)
);&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;span style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; -webkit-text-stroke: var(--cos-font-medium-stroke); font-weight: 600 !important;&quot;&gt;远程加载&lt;/span&gt;‌：通过&lt;code style=&quot;margin: 0px 4px; padding: 1px 4px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background: var(--cos-color-border-minor); border-radius: 6px; color: var(--cos-color-text);&quot;&gt;UnityWebRequest&lt;/code&gt;下载并缓存（支持热更新）‌&lt;span disable-audio=&quot;true&quot; disable-copy=&quot;true&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;margin-top: 12px; margin-bottom: 12px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background-color: rgba(245, 246, 249, 0.5); line-height: 24px; border-radius: var(--cos-rounded-sm);&quot;&gt;IEnumerator&amp;nbsp;LoadFromWeb()
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string&amp;nbsp;url&amp;nbsp;=&amp;nbsp;&amp;quot;http://cdn.example.com/bundles/weapons_bundle&amp;quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UnityWebRequest&amp;nbsp;request&amp;nbsp;=&amp;nbsp;UnityWebRequestAssetBundle.GetAssetBundle(url);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;yield&amp;nbsp;return&amp;nbsp;request.SendWebRequest();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AssetBundle&amp;nbsp;bundle&amp;nbsp;=&amp;nbsp;DownloadHandlerAssetBundle.GetContent(request);
}&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;p class=&quot;marklang-paragraph&quot; style=&quot;margin-top: 7px; margin-bottom: 7px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; font-size: var(--cos-text-body-lg); line-height: 29px; -webkit-text-stroke-color: initial; color: var(--cos-color-text); font-weight: var(--cos-font-regular);&quot;&gt;‌&lt;span style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; -webkit-text-stroke: var(--cos-font-medium-stroke); font-weight: 600 !important;&quot;&gt;加载具体资源&lt;/span&gt;‌&lt;/p&gt;&lt;/li&gt;&lt;ul style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;‌&lt;span style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; -webkit-text-stroke: var(--cos-font-medium-stroke); font-weight: 600 !important;&quot;&gt;同步加载&lt;/span&gt;‌：通过资源名称获取预制体或纹理‌&lt;span disable-audio=&quot;true&quot; disable-copy=&quot;true&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;margin-top: 12px; margin-bottom: 12px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background-color: rgba(245, 246, 249, 0.5); line-height: 24px; border-radius: var(--cos-rounded-sm);&quot;&gt;GameObject&amp;nbsp;swordPrefab&amp;nbsp;=&amp;nbsp;bundle.LoadAsset&amp;lt;GameObject&amp;gt;(&amp;quot;Sword_01&amp;quot;);
Instantiate(swordPrefab);&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;span style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; -webkit-text-stroke: var(--cos-font-medium-stroke); font-weight: 600 !important;&quot;&gt;异步加载&lt;/span&gt;‌：优化性能的分帧加载方式‌&lt;span disable-audio=&quot;true&quot; disable-copy=&quot;true&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;7&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;margin-top: 12px; margin-bottom: 12px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background-color: rgba(245, 246, 249, 0.5); line-height: 24px; border-radius: var(--cos-rounded-sm);&quot;&gt;IEnumerator&amp;nbsp;LoadAsync()
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AssetBundleRequest&amp;nbsp;request&amp;nbsp;=&amp;nbsp;bundle.LoadAssetAsync&amp;lt;Texture&amp;gt;(&amp;quot;Bow_Texture&amp;quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;yield&amp;nbsp;return&amp;nbsp;request;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GetComponent&amp;lt;Renderer&amp;gt;().material.mainTexture&amp;nbsp;=&amp;nbsp;request.asset&amp;nbsp;as&amp;nbsp;Texture;
}&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;hr style=&quot;margin: 12px 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background-color: rgb(255, 255, 255); border: none; height: 1px; position: relative; width: auto; color: rgb(51, 51, 51); font-family: &amp;quot;PingFang SC&amp;quot;, Arial, sans-serif; font-size: 16px; text-wrap: wrap;&quot;/&gt;&lt;h3 style=&quot;margin: 11px 0px 6px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; line-height: 30px; font-size: 18px; -webkit-text-stroke-color: initial; font-family: &amp;quot;PingFang SC&amp;quot;, Arial, sans-serif; color: rgb(51, 51, 51); text-wrap: wrap; background-color: rgb(255, 255, 255);&quot;&gt;三、关键注意事项&lt;/h3&gt;&lt;ol style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p class=&quot;marklang-paragraph&quot; style=&quot;margin-top: 7px; margin-bottom: 7px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; font-size: var(--cos-text-body-lg); line-height: 29px; -webkit-text-stroke-color: initial; color: var(--cos-color-text); font-weight: var(--cos-font-regular);&quot;&gt;‌&lt;span style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; -webkit-text-stroke: var(--cos-font-medium-stroke); font-weight: 600 !important;&quot;&gt;依赖加载&lt;/span&gt;‌&lt;/p&gt;&lt;/li&gt;&lt;ul style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;通过主包&lt;code style=&quot;margin: 0px 4px; padding: 1px 4px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background: var(--cos-color-border-minor); border-radius: 6px; color: var(--cos-color-text);&quot;&gt;AssetBundleManifest&lt;/code&gt;获取依赖列表，需先加载依赖Bundle‌&lt;span disable-audio=&quot;true&quot; disable-copy=&quot;true&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;margin-top: 12px; margin-bottom: 12px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background-color: rgba(245, 246, 249, 0.5); line-height: 24px; border-radius: var(--cos-rounded-sm);&quot;&gt;AssetBundle&amp;nbsp;mainBundle&amp;nbsp;=&amp;nbsp;AssetBundle.LoadFromFile(&amp;quot;AssetBundles/AssetBundles&amp;quot;);
AssetBundleManifest&amp;nbsp;manifest&amp;nbsp;=&amp;nbsp;mainBundle.LoadAsset&amp;lt;AssetBundleManifest&amp;gt;(&amp;quot;AssetBundleManifest&amp;quot;);
string[]&amp;nbsp;deps&amp;nbsp;=&amp;nbsp;manifest.GetAllDependencies(&amp;quot;weapons_bundle&amp;quot;);&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;p class=&quot;marklang-paragraph&quot; style=&quot;margin-top: 7px; margin-bottom: 7px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; font-size: var(--cos-text-body-lg); line-height: 29px; -webkit-text-stroke-color: initial; color: var(--cos-color-text); font-weight: var(--cos-font-regular);&quot;&gt;‌&lt;span style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; -webkit-text-stroke: var(--cos-font-medium-stroke); font-weight: 600 !important;&quot;&gt;内存管理&lt;/span&gt;‌&lt;/p&gt;&lt;/li&gt;&lt;ul style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;卸载时调用&lt;code style=&quot;margin: 0px 4px; padding: 1px 4px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; background: var(--cos-color-border-minor); border-radius: 6px; color: var(--cos-color-text);&quot;&gt;AssetBundle.Unload(true)&lt;/code&gt;释放资源内存，避免泄漏‌&lt;span disable-audio=&quot;true&quot; disable-copy=&quot;true&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;p class=&quot;marklang-paragraph&quot; style=&quot;margin-top: 7px; margin-bottom: 7px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; font-size: var(--cos-text-body-lg); line-height: 29px; -webkit-text-stroke-color: initial; color: var(--cos-color-text); font-weight: var(--cos-font-regular);&quot;&gt;‌&lt;span style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; -webkit-text-stroke: var(--cos-font-medium-stroke); font-weight: 600 !important;&quot;&gt;平台兼容性&lt;/span&gt;‌&lt;/p&gt;&lt;/li&gt;&lt;ul style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;不同平台需单独构建Bundle（如Android与iOS不兼容）‌&lt;span disable-audio=&quot;true&quot; disable-copy=&quot;true&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span rl-type=&quot;stop&quot; style=&quot;margin: 0px; padding: 0px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;&lt;span class=&quot;cos-tooltip cosd-citation&quot; style=&quot;margin-top: 0px; margin-right: var(--cos-space-3xs); margin-bottom: 0px; margin-left: var(--cos-space-3xs); padding: 0px; position: relative; display: inline-flex; line-height: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin; height: 12px; width: 14px;&quot;&gt;&lt;span class=&quot;cosd-citation-citationId &quot; style=&quot;margin: 0px; padding: 0px; background: rgba(223, 223, 245, 0.4); border-radius: var(--cos-rounded-full); color: var(--cos-color-text-tiny); cursor: pointer; display: inline-block; font-size: 12px; height: 14px; line-height: 14px; position: absolute; text-align: center; vertical-align: text-bottom; text-wrap: nowrap; width: 14px; -webkit-font-smoothing: antialiased; scrollbar-color: rgba(184, 186, 193, 0.6) transparent; scrollbar-width: thin;&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Tue, 15 Apr 2025 20:26:57 +0800</pubDate></item><item><title>使用Steamwork.Net 接入Steam一点心得【转载】</title><link>https://www.kalet.cn/post/903.html</link><description>&lt;div class=&quot;common-layout_2nkrhjEm&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-family: PingFangSC, Inter, sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;div class=&quot;actor_2pQYroSz&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); display: flex; -webkit-box-align: center; align-items: center; margin: 0px 0px 40px;&quot;&gt;&lt;div class=&quot;read-num_2x2XOFUj&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin-left: auto; margin-top: 8px; display: flex; -webkit-box-align: center; align-items: center; font-size: 12px; font-stretch: normal; line-height: 1.67; text-align: right; color: rgb(121, 121, 121);&quot;&gt;&lt;div style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-align: left;&quot;&gt;阅读 826&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;2022年6月2日&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;sub-title_8zoP6jTu&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-size: 16px; font-stretch: normal; line-height: 1.5; color: rgb(97, 97, 97); background-color: rgb(246, 248, 250); border-radius: 2px; padding: 20px 24px; position: relative; margin: 0px 0px 40px;&quot;&gt;&lt;div class=&quot;sub-title-content_6wiCL8tr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; z-index: 1;&quot;&gt;这是我在开发过程中使用的一点总结，目前使用的东西包含基础登录功能，存档功能，成就系统，以及DLC安装功能。Steamwork不仅仅有这些功能还有游戏内交易，排行榜，数据传输等功能，这些功能我并未亲身体验过于是不包含在本文档当中。文章详细使用在《Steamwork.Net使用》这里&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;project-container_8AqZYjtx&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-family: PingFangSC, Inter, sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;div class=&quot;editor-preview_23bKS1Q1 use-picture-magnifier_1IND7FMP&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;div class=&quot;draft-editor_DDG2ZTdS&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-size: 16px; line-height: 1.5; color: rgb(33, 33, 33); position: relative;&quot;&gt;&lt;div class=&quot;DraftEditor-root&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); height: inherit; text-align: initial; position: relative;&quot;&gt;&lt;div class=&quot;DraftEditor-editorContainer&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); height: inherit; text-align: initial; background-color: rgba(255, 255, 255, 0); border-left: 0.1px solid transparent; position: relative; z-index: 1;&quot;&gt;&lt;div class=&quot;public-DraftEditor-content&quot; contenteditable=&quot;false&quot; spellcheck=&quot;false&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); height: inherit; text-align: initial; outline: none; user-select: text; white-space-collapse: preserve; overflow-wrap: break-word;&quot;&gt;&lt;div data-contents=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;h2 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-two&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;2mpgn-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;2mpgn-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;2mpgn-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;1. 前言&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h2&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;c1ume-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;c1ume-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;c1ume-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;这是我在开发过程中使用的一点总结，目前使用的东西包含基础登录功能，存档功能，成就系统，以及DLC安装功能。Steamwork不仅仅有这些功能还有游戏内交易，排行榜，数据传输等功能，这些功能我并未亲身体验过于是不包含在本文档当中。文章详细使用在《&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;link_1b1gsGGH&quot; href=&quot;https://developer.unity.cn/projects/62986a1eedbc2a001d4bd022&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(33, 150, 243); text-decoration-line: none; transition: none 86ms ease-out 0s; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span data-offset-key=&quot;c1ume-1-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;Steamwork.Net使用&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span data-offset-key=&quot;c1ume-2-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;》这里不想看前面可以直接跳过&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-two&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;4q6kl-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;4q6kl-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;4q6kl-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;2. 版本&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h2&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;faeug-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;faeug-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;faeug-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;我使用的版本为Steamworks.NET_15.0.1请大家注意版本不同&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-two&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;6mb1j-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;6mb1j-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;6mb1j-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;3. Steamwork.Net 官方下载地址&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h2&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;c6vis-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;c6vis-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;a class=&quot;link_1b1gsGGH&quot; href=&quot;https://github.com/rlabrecque/Steamworks.NET/releases/&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(33, 150, 243); text-decoration-line: none; transition: none 86ms ease-out 0s; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span data-offset-key=&quot;c6vis-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;https://github.com/rlabrecque/Steamworks.NET/releases/&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-two&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;2b3lb-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;2b3lb-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;2b3lb-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;4. 前期准备&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h2&gt;&lt;h3 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-three&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;4epg5-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;4epg5-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;4epg5-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;4.1 建立游戏&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h3&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;cttk1-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;cttk1-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;cttk1-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;首先您需要在Steam平台建立您自己的游戏（在Steam建立游戏需要花钱），并获得相关游戏ID，就像我图中的这样：&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;span data-offset-key=&quot;th5n-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;br data-text=&quot;true&quot; style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;figure class=&quot;custom-block-default_8Oa-FJl6 custom-block-atomic&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;d5adq-0-0&quot; contenteditable=&quot;false&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div class=&quot;image-wrap_3OW65Zcp&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; line-height: 0; text-align: center;&quot;&gt;&lt;img src=&quot;https://www.kalet.cn/zb_users/upload/2023/09/20230910081018169430461858905.png&quot; style=&quot;box-sizing: border-box; border-style: none; max-width: 100%; cursor: pointer;&quot;/&gt;&lt;/div&gt;&lt;/figure&gt;&lt;span data-offset-key=&quot;1jiq5-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;br data-text=&quot;true&quot; style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;d41du-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;d41du-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;d41du-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;其中1274360就是我做的游戏ID,下面是我的游戏DLC编号（这个在DLC使用篇会有用到）。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-three&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;11rnh-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;11rnh-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;11rnh-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;4.2 建立成就&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h3&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;fp5q6-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;fp5q6-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;fp5q6-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;如图所示，API名称是&lt;/span&gt;&lt;/span&gt;&lt;span data-offset-key=&quot;fp5q6-0-1&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ; font-weight: bold;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;程序在内部调用&lt;/span&gt;&lt;/span&gt;&lt;span data-offset-key=&quot;fp5q6-0-2&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;的,剩下的显示成就名称与描述，可以根据不同语言进行调整。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;span data-offset-key=&quot;ekh4s-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;br data-text=&quot;true&quot; style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;figure class=&quot;custom-block-default_8Oa-FJl6 custom-block-atomic&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;9tv5v-0-0&quot; contenteditable=&quot;false&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div class=&quot;image-wrap_3OW65Zcp&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; line-height: 0; text-align: center;&quot;&gt;&lt;img src=&quot;https://www.kalet.cn/zb_users/upload/2023/09/20230910081018169430461877701.png&quot; style=&quot;box-sizing: border-box; border-style: none; max-width: 100%; cursor: pointer;&quot;/&gt;&lt;/div&gt;&lt;/figure&gt;&lt;span data-offset-key=&quot;3vm14-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;br data-text=&quot;true&quot; style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;h2 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-two&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;ea4qq-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;ea4qq-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;ea4qq-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5. Steamwork.Net使用&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h2&gt;&lt;h3 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-three&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;as8u4-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;as8u4-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;as8u4-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.1 建立文件&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h3&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;br0hh-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;br0hh-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;br0hh-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;Steamwork.Net 需要在游戏运行目录下/Unity Asset目录下建立steam_appid.txt文件并在文件中写入游戏ID（对就是&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;link_1b1gsGGH&quot; href=&quot;https://developer.unity.cn/projects/62986a1eedbc2a001d4bd022#_4.1_%E5%BB%BA%E7%AB%8B%E6%B8%B8%E6%88%8F&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(33, 150, 243); text-decoration-line: none; transition: none 86ms ease-out 0s; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span data-offset-key=&quot;br0hh-1-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;在建立游戏那里的ID&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span data-offset-key=&quot;br0hh-2-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;）.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-three&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;dvtap-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;dvtap-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;dvtap-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.2 使用前检查&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h3&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;dlgq3-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;dlgq3-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;dlgq3-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;检测建立的结构体空间是否能够正常使用&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;2k54u-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;2k54u-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;2k54u-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值Bool&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;78fpp-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;78fpp-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;78fpp-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;Packsize.Test();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;28aj2-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;28aj2-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;28aj2-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;检测依赖DLL是否存在 返回值Bool&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;3kbpm-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;3kbpm-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;3kbpm-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;DllCheck.Test();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;avrkp-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;avrkp-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;avrkp-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;如果检测返回false建议不要继续下去，可能游戏被篡改了，或者文件丢失&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-three&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;9k8le-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;9k8le-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;9k8le-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.3 建立SteamManager空物体&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h3&gt;&lt;h3 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-three&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;rrgu-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;span data-offset-key=&quot;rrgu-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;br data-text=&quot;true&quot; style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;/h3&gt;&lt;figure class=&quot;custom-block-default_8Oa-FJl6 custom-block-atomic&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;b5jr2-0-0&quot; contenteditable=&quot;false&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div class=&quot;image-wrap_3OW65Zcp&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; line-height: 0; text-align: center;&quot;&gt;&lt;img src=&quot;https://www.kalet.cn/zb_users/upload/2023/09/20230910081018169430461845845.png&quot; style=&quot;box-sizing: border-box; border-style: none; max-width: 100%; cursor: pointer;&quot;/&gt;&lt;/div&gt;&lt;/figure&gt;&lt;span data-offset-key=&quot;95f24-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;br data-text=&quot;true&quot; style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;eo583-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;eo583-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;eo583-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;并设置该物体为不销毁，原因如下：下方为SteamWorkAPI官方代码&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;span data-offset-key=&quot;boep1-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;br data-text=&quot;true&quot; style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;figure class=&quot;custom-block-default_8Oa-FJl6 custom-block-atomic&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;bgemb-0-0&quot; contenteditable=&quot;false&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div class=&quot;image-wrap_3OW65Zcp&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; line-height: 0; text-align: center;&quot;&gt;&lt;img src=&quot;https://www.kalet.cn/zb_users/upload/2023/09/20230910081018169430461811838.png&quot; style=&quot;box-sizing: border-box; border-style: none; max-width: 100%; cursor: pointer;&quot;/&gt;&lt;/div&gt;&lt;/figure&gt;&lt;span data-offset-key=&quot;98ntn-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;br data-text=&quot;true&quot; style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;9ogfr-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;9ogfr-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;9ogfr-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;系统将会根据物体的存在自动进行关闭SteamAPI连接&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;fomh3-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;fomh3-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;fomh3-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;并且 在Update时会自动调用RunCallBacks(这是异步操作响应的关键)当然你可以用自己的方法进行控制；&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;fbsai-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;fbsai-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;fbsai-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;可让物品不销毁的函数（Unity）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;2kmq6-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;2kmq6-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;2kmq6-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;DontDestroyOnLoad(apiObj);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-three&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;39an7-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;39an7-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;39an7-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.4 开始使用（初始化）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h3&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;3ibmi-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;3ibmi-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;3ibmi-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明:传入类型(AppId_t) 传入内容Int64 (ID是游戏的ID)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;878s-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;878s-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;878s-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值:bool&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;bru4h-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;bru4h-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;bru4h-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能:传入游戏的ID （在Init之前传入）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;ejcou-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;ejcou-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;ejcou-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamAPI.RestartAppIfNecessary((AppId_t)ID);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;e95h7-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;e95h7-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;e95h7-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明：Void&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;47b7c-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;47b7c-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;47b7c-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值：bool&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;e7m68-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;e7m68-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;e7m68-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能：初始化SteamAPI（必须初始化才可以调用具体功能的API）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;6ee3b-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;6ee3b-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;6ee3b-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamAPI.Init()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-three&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;ee6ho-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;ee6ho-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;ee6ho-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.5 功能展示&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h3&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;9040a-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;9040a-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;9040a-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;需要在SteamAPI初始化完成后才能进行下面的操作&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-four&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;d022p-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;d022p-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;d022p-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.5.1 获取用户唯一标识&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h4&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;106f4-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;106f4-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;106f4-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明：Void&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;djo2u-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;djo2u-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;djo2u-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值：CSteamID（用户唯一ID）可转换为Int64/String&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;3md0n-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;3md0n-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;3md0n-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能：获取用户ID&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;ac40s-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;ac40s-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;ac40s-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamUser.GetSteamID();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-four&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;8m9gu-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;8m9gu-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;8m9gu-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.5.2 成就/统计相关操作&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h4&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;agtpf-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;agtpf-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;agtpf-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明：成就名称(传入&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;link_1b1gsGGH&quot; href=&quot;https://developer.unity.cn/projects/62986a1eedbc2a001d4bd022#_%E5%BB%BA%E7%AB%8B%E6%88%90%E5%B0%B1&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(33, 150, 243); text-decoration-line: none; transition: none 86ms ease-out 0s; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span data-offset-key=&quot;agtpf-1-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;设置的成就&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span data-offset-key=&quot;agtpf-2-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;名称)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;7caec-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;7caec-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;7caec-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值：bool&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;8cho6-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;8cho6-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;8cho6-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能：清除所有已经获得的成就（该操作作为研发测试使用,亲测使用时速度很快,使用内存中的数据）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;k4nn-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;k4nn-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;k4nn-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamUserStats.ClearAchievement(string Name);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;3lvft-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;3lvft-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;3lvft-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明: 成就名称(传入&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;link_1b1gsGGH&quot; href=&quot;https://developer.unity.cn/projects/62986a1eedbc2a001d4bd022#_%E5%BB%BA%E7%AB%8B%E6%88%90%E5%B0%B1&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(33, 150, 243); text-decoration-line: none; transition: none 86ms ease-out 0s; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span data-offset-key=&quot;3lvft-1-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;设置的成就&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span data-offset-key=&quot;3lvft-2-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;名称)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;7ib2q-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;7ib2q-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;7ib2q-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值：bool&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;doqid-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;doqid-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;doqid-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能：设置成就已经获得（使用内存中的数据，亲测使用时速度很快）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;53r01-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;53r01-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;53r01-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamUserStats.SetAchievement(chengjiuName);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;4mh05-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;4mh05-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;4mh05-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明: 成就名称(传入&lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;link_1b1gsGGH&quot; href=&quot;https://developer.unity.cn/projects/62986a1eedbc2a001d4bd022#_%E5%BB%BA%E7%AB%8B%E6%88%90%E5%B0%B1&quot; style=&quot;box-sizing: border-box; background-color: transparent; color: rgb(33, 150, 243); text-decoration-line: none; transition: none 86ms ease-out 0s; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span data-offset-key=&quot;4mh05-1-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;设置的成就&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span data-offset-key=&quot;4mh05-2-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;名称) ，是否获得成就(输出参数)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;3qs2a-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;3qs2a-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;3qs2a-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值：bool 仅为是否调用成功&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;53tmu-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;53tmu-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;53tmu-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能：设置成就已经获得（使用内存中的数据，亲测使用时速度很快）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;292eg-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;292eg-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;292eg-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamUserStats.GetAchievement(chengjiu, out res);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;cl9e3-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;cl9e3-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;cl9e3-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明：统计名称，统计数据&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;5s6t5-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;5s6t5-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;5s6t5-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值：bool&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;3cp7r-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;3cp7r-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;3cp7r-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能： 设置统计数据，操作为内存中的数据&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;6mc36-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;6mc36-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;6mc36-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamUserStats.SetStat（string name,int/float data）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;35ooo-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;35ooo-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;35ooo-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明：统计名称，统计数据（输出参数）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;ch6sp-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;ch6sp-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;ch6sp-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值：bool&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;7o68j-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;7o68j-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;7o68j-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能：获得当前的统计数据&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;cmn0a-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;cmn0a-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;cmn0a-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamUserStats.GetStat(chengjiuName, out data);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;f0gte-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;f0gte-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;f0gte-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明:Void&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;4o3sa-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;4o3sa-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;4o3sa-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值：bool&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;7lpe1-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;7lpe1-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;7lpe1-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能：将本地成就，统计同步到服务器（速度根据网络实际情况决定，不是很快，Steam在游戏关了有自动同步，但是有失败的概率， Steam显示成就达成的UI在成就同步完成后显示，建议定时调用）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;4o372-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;4o372-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;4o372-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamUserStats.StoreStats();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-four&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;699ja-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;699ja-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;699ja-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.5.3 云存档相关操作&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h4&gt;&lt;h5 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-five&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;jatm-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;jatm-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;jatm-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.5.3.1 特别说明&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h5&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;k79s-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;k79s-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;k79s-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;由于众所周知的原因Steam 云存档传入传出速度并不快，如果使用同步方法，很容易造成卡死，于是这里我使用异步方法(异步方法复杂程度较大)并且提供示例代码&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h5 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-five&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;a03e5-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;a03e5-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;a03e5-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.5.3.2 方法说明&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h5&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;dbvn6-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;dbvn6-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;dbvn6-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明:Void&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;i9ss-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;i9ss-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;i9ss-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值：bool&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;dohji-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;dohji-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;dohji-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能：检测当前玩家设置（云存档是否启用）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;d0o5m-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;d0o5m-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;d0o5m-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamRemoteStorage.IsCloudEnabledForApp()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h6 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-six&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;fos8b-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;fos8b-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;fos8b-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.5.3.2.1 写入服务器文件一系列函数/类&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h6&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;pt06-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;pt06-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;pt06-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明:服务器文件名称,文件数据，文件长度&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;51bf9-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;51bf9-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;51bf9-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值：SteamAPICall_t（一个指针ID，用于匹配异步返回的操作）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;e1ig3-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;e1ig3-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;e1ig3-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能：异步写入服务器文件 如果有原始文件则覆盖，没有就创建&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;bqvf0-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;bqvf0-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;bqvf0-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamRemoteStorage.FileWriteAsync(string FileName, byte[] Data,uint Length);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;5dv24-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;5dv24-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;5dv24-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;这是一个特有的类似委托的类 用于接受并触发 当文件读取完成 回调函数的操作（下方会讲解如何使用）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;aokfk-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;aokfk-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;aokfk-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;CallResult&amp;lt;RemoteStorageFileWriteAsyncComplete_t&amp;gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;b6ep6-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;b6ep6-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;b6ep6-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.5.3.2.1.1 写入相关操作流程&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;public-DraftStyleDefault-ol list-paddingleft-2&quot; data-offset-key=&quot;38gm-0-0&quot; style=&quot;box-sizing: border-box; margin-top: 16px; margin-bottom: 16px; padding: 0px;&quot;&gt;&lt;li&gt;&lt;div data-offset-key=&quot;38gm-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;38gm-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;首先调用异步写入文件(如果要求不严谨这里其实就完了) 得到标记指针&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;nn7j-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;nn7j-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;nn7j-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;Var call=SteamRemoteStorage.FileWriteAsync(ContentDocument.FileName, Data, (uint)Data.Length);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;public-DraftStyleDefault-ol list-paddingleft-2&quot; data-offset-key=&quot;c71vj-0-0&quot; style=&quot;box-sizing: border-box; margin-top: 16px; margin-bottom: 16px; padding: 0px;&quot;&gt;&lt;li&gt;&lt;div data-offset-key=&quot;c71vj-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;c71vj-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;创建回调对象，设置回调函数 红色部分&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;b5obc-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;b5obc-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;b5obc-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;var OnRemoteStorageFileWriteAsyncCompleteCallResult = CallResult&amp;lt;RemoteStorageFileWriteAsyncComplete_t&amp;gt;.Create(OnRemoteStorageFileWriteAsyncComplete);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;5g5ms-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;5g5ms-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;5g5ms-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;//重点设置call指针 否则永远不会被回调&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;194c9-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;194c9-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;194c9-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;OnRemoteStorageFileWriteAsyncCompleteCallResult.Set(call);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;public-DraftStyleDefault-ol list-paddingleft-2&quot; data-offset-key=&quot;fj365-0-0&quot; style=&quot;box-sizing: border-box; margin-top: 16px; margin-bottom: 16px; padding: 0px;&quot;&gt;&lt;li&gt;&lt;div data-offset-key=&quot;fj365-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;fj365-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;等待回调&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;459d5-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;459d5-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;459d5-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;4.回调函数内部&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;fidoc-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;fidoc-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;fidoc-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;void OnRemoteStorageFileWriteAsyncComplete(RemoteStorageFileWriteAsyncComplete_t pCallback, bool bIOFailure)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;bn27g-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;bn27g-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;bn27g-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;98emb-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;98emb-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;98emb-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;//根据EResult 判断是否传递成功&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;a61hj-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;a61hj-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;a61hj-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;var res= pCallback.m_eResult;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;5b85c-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;5b85c-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;5b85c-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h6 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-six&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;7imm7-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;7imm7-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;7imm7-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.5.3.2.2 取得服务器文件一系列函数/类&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h6&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;9bqp7-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;9bqp7-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;9bqp7-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明:服务器文件名称&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;3jn0f-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;3jn0f-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;3jn0f-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值：Int32（服务器文件大小）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;2t8qf-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;2t8qf-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;2t8qf-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能：获得服务器文件大小&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;2ohuc-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;2ohuc-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;2ohuc-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamRemoteStorage.GetFileSize(string FileName);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;d6vqf-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;d6vqf-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;d6vqf-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明:服务器文件名称，文件开始，文件大小&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;eajs0-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;eajs0-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;eajs0-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值：SteamAPICall_t（一个指针ID，用于匹配异步返回的操作）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;443lo-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;443lo-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;443lo-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能：获得服务器文件（异步），该操作点击执行后，会在后台下载该文件，不会导致主线程卡顿，需要通过其他函数查看下载情况&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;1mbn-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;1mbn-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;1mbn-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamRemoteStorage.FileReadAsync(string FileName, uint start, uint size);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;funa3-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;funa3-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;funa3-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;这是一个特有的类似委托的类 用于接受并触发 当文件读取完成 回调函数的操作（下方会讲解如何使用）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;do8j0-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;do8j0-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;do8j0-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;CallResult&amp;lt;RemoteStorageFileReadAsyncComplete_t&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;fhtul-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;fhtul-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;fhtul-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明:传入标记指针，文件本身数据，文件大小&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;7qavo-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;7qavo-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;7qavo-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值：bool（是否调用成功）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;4orgl-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;4orgl-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;4orgl-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能：获得服务器文件本身&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;3echm-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;3echm-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;3echm-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamRemoteStorage.FileReadAsyncComplete (SteamAPICall_thReadCall, byte[] pvBuffer, uint cubToRead);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;726te-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;726te-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;726te-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.5.3.2.2.1 取得服务器文件操作&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;elh5p-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;elh5p-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;elh5p-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;1.第一步 获取服务器文件长度&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;7ndcp-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;7ndcp-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;7ndcp-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamRemoteStorage.GetFileSize(文件名称);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;public-DraftStyleDefault-ol list-paddingleft-2&quot; data-offset-key=&quot;71lkl-0-0&quot; style=&quot;box-sizing: border-box; margin-top: 16px; margin-bottom: 16px; padding: 0px;&quot;&gt;&lt;li&gt;&lt;div data-offset-key=&quot;71lkl-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;71lkl-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;调用服务器异步读取函数 我这里演示的获取这个文件全部内容，如果你喜欢分段获取也可以，此时调用完成你获得了 一个SteamAPICall_t 指针标记&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;1eoae-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;1eoae-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;1eoae-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamRemoteStorage.FileReadAsync(ContentDocument.FileName, 0, (uint)size);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;public-DraftStyleDefault-ol list-paddingleft-2&quot; data-offset-key=&quot;uufi-0-0&quot; style=&quot;box-sizing: border-box; margin-top: 16px; margin-bottom: 16px; padding: 0px;&quot;&gt;&lt;li&gt;&lt;div data-offset-key=&quot;uufi-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;uufi-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;创建回调类，我标记红色的是传入的回调函数&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;39cna-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;39cna-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;39cna-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;var OnRemoteStorageFileReadAsyncCompleteCallResult =CallResult&amp;lt;RemoteStorageFileReadAsyncComplete_t&amp;gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;ep60-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;ep60-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;ep60-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;Create(OnRemoteStorageFileReadAsyncComplete);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;5mom6-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;5mom6-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;5mom6-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;重点在这里，设置之前获得的SteamAPICall_t 指针标记，才能成功回调&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;d3sdf-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;d3sdf-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;d3sdf-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;OnRemoteStorageFileReadAsyncCompleteCallResult.Set(rescall);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;97mm6-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;97mm6-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;97mm6-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;下面是函数头部&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;bib7r-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;bib7r-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;bib7r-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;voidOnRemoteStorageFileReadAsyncComplete(RemoteStorageFileReadAsyncComplete_t pCallback, bool bIOFailure);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;51o4a-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;51o4a-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;51o4a-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;4.等待服务器回调，回调完成后根据是否成功取得文件&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;7gujp-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;7gujp-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;7gujp-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;voidOnRemoteStorageFileReadAsyncComplete(RemoteStorageFileReadAsyncComplete_t pCallback, bool bIOFailure)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;acqon-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;acqon-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;acqon-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;ffsj8-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;ffsj8-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;ffsj8-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;if (pCallback.m_eResult == EResult.k_EResultOK)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;v75c-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;v75c-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;v75c-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;1ej29-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;1ej29-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;1ej29-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;byte[] Data = new byte[pCallback.m_cubRead];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;fplb9-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;fplb9-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;fplb9-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;//说明可以读取文件&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;dtc5g-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;dtc5g-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;dtc5g-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamRemoteStorage.FileReadAsyncComplete(pCallback.m_hFileReadAsync, Data, pCallback.m_cubRead);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;32rgi-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;32rgi-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;32rgi-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;77oi3-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;77oi3-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;77oi3-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 class=&quot;custom-block-default_8Oa-FJl6 custom-block-header-four&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;cr715-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;cr715-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;cr715-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;5.5.4 获取DLC购买情况&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h4&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;dg3pk-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;dg3pk-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;dg3pk-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;参数说明:传入DLC ID 可以由Uint 转入&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;3ggbe-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;3ggbe-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;3ggbe-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;返回值：bool（是否调用成功）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;dlfog-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;dlfog-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;dlfog-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;功能：获得DLC是否正确安装&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;custom-block-default_8Oa-FJl6 custom-block-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;ebe86&quot; data-offset-key=&quot;7ablr-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px 0px 24px;&quot;&gt;&lt;div data-offset-key=&quot;7ablr-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; direction: ltr;&quot;&gt;&lt;span data-offset-key=&quot;7ablr-0-0&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;&lt;span data-text=&quot;true&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: ;&quot;&gt;SteamApps.BIsDlcInstalled(appId_T);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;转自：&lt;a href=&quot;https://developer.unity.cn/projects/62986a1eedbc2a001d4bd022&quot;&gt;使用Steamwork.Net 接入Steam一点心得 - 技术专栏 - Unity官方开发者社区&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 10 Sep 2023 08:08:16 +0800</pubDate></item><item><title>VB.NET发送post请求的三种方式指定发送字符串内容、键值对和json串</title><link>https://www.kalet.cn/post/902.html</link><description>&lt;p&gt;转自：&lt;a href=&quot;https://blog.csdn.net/zzh17610456810/article/details/121945898&quot;&gt;VB.NET发送post请求的三种方式指定发送字符串内容、键值对和json串_vb.net post-CSDN博客&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: wrap;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;#39;&amp;#39;&amp;#39; &amp;lt;summary&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; 指定Post地址使用Get 方式获取全部字符串&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;/summary&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;param name=&amp;quot;url&amp;quot;&amp;gt;请求地址&amp;lt;/param&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;param name=&amp;quot;dic&amp;quot;&amp;gt;键值对&amp;lt;/param&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;returns&amp;gt;返回字符串&amp;lt;/returns&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; Public Function Post(ByVal url As String, ByVal dic As Dictionary(Of String, String)) As String&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim result As String = &amp;quot;&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim req As HttpWebRequest = CType(WebRequest.Create(url), HttpWebRequest)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req.Method = &amp;quot;POST&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req.ContentType = &amp;quot;application/x-www-form-urlencoded;charset=UTF-8&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim builder As StringBuilder = New StringBuilder()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim i As Integer = 0&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; For Each item In dic&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If i &amp;gt; 0 Then builder.Append(&amp;quot;&amp;amp;&amp;quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; builder.AppendFormat(&amp;quot;{0}={1}&amp;quot;, item.Key, item.Value)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i += 1&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Next&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim data As Byte() = Encoding.UTF8.GetBytes(builder.ToString())&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req.ContentLength = data.Length&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Using reqStream As Stream = req.GetRequestStream()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reqStream.Write(data, 0, data.Length)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reqStream.Close()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End Using&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim resp As HttpWebResponse = CType(req.GetResponse(), HttpWebResponse)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim stream As Stream = resp.GetResponseStream()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Using reader As StreamReader = New StreamReader(stream, Encoding.UTF8)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result = reader.ReadToEnd()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End Using&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Return result&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; End Function&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;summary&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; 指定Post地址使用Get 方式获取全部字符串&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;/summary&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;param name=&amp;quot;url&amp;quot;&amp;gt;请求地址&amp;lt;/param&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;param name=&amp;quot;content&amp;quot;&amp;gt;Post提交数据内容(utf-8编码的)&amp;lt;/param&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;returns&amp;gt;返回字符串&amp;lt;/returns&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; Public Function Post(ByVal url As String, ByVal content As String) As String&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim result As String = &amp;quot;&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim req As HttpWebRequest = CType(WebRequest.Create(url), HttpWebRequest)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req.Method = &amp;quot;POST&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req.ContentType = &amp;quot;application/x-www-form-urlencoded&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim data As Byte() = Encoding.UTF8.GetBytes(content)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req.ContentLength = data.Length&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Using reqStream As Stream = req.GetRequestStream()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reqStream.Write(data, 0, data.Length)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reqStream.Close()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End Using&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim resp As HttpWebResponse = CType(req.GetResponse(), HttpWebResponse)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim stream As Stream = resp.GetResponseStream()&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Using reader As StreamReader = New StreamReader(stream, Encoding.UTF8)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result = reader.ReadToEnd()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End Using&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Return result&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; End Function&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;#39;&amp;#39;&amp;#39; &amp;lt;summary&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; json串post请求&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;/summary&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;param name=&amp;quot;url&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;param name=&amp;quot;postData&amp;quot;&amp;gt;json字符串&amp;lt;/param&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;#39;&amp;#39;&amp;#39; &amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; Public Function Post(ByVal url As String, ByVal postData As String) As String&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim result As String = &amp;quot;&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim req As HttpWebRequest = CType(WebRequest.Create(url), HttpWebRequest)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req.Method = &amp;quot;POST&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req.Timeout = &amp;quot;800&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req.ContentType = &amp;quot;application/json&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim data As Byte() = Encoding.UTF8.GetBytes(postData)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; req.ContentLength = data.Length&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Using reqStream As Stream = req.GetRequestStream()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reqStream.Write(data, 0, data.Length)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reqStream.Close()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End Using&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim resp As HttpWebResponse = CType(req.GetResponse(), HttpWebResponse)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim stream As Stream = resp.GetResponseStream()&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Using reader As StreamReader = New StreamReader(stream, Encoding.UTF8)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result = reader.ReadToEnd()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End Using&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Return result&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; End Function&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4D4D4D; font-family: -apple-system, &amp;quot;SF UI Text&amp;quot;, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif, SimHei, SimSun; font-size: 16px; text-wrap: wrap; background-color: #FFFFFF;&quot;&gt;json串最好新建一个实体类(tip:关键字和属性名冲突,可以中括号括起来声明[属性名]),实体类对象(new class.root)通过Newtonsoft.Json.dll序列化成json&lt;/span&gt;&lt;/p&gt;</description><pubDate>Thu, 07 Sep 2023 16:28:49 +0800</pubDate></item><item><title>Unity联网状态下获取网络时间否则获取本地时间，用于Unity程序倒计时和显示时间</title><link>https://www.kalet.cn/post/901.html</link><description>&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;转自：&lt;a href=&quot;https://blog.csdn.net/weixin_44047050/article/details/131592458&quot;&gt;Unity联网状态下获取网络时间否则获取本地时间，用于Unity程序倒计时和显示时间_weixin_44047050的博客-CSDN博客&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;using System;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;using System.Net;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;using UnityEngine;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;public class GetCurrentTime : MonoBehaviour&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; private void Start()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DateTime currentTime;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (Application.internetReachability != NetworkReachability.NotReachable)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 如果连接到互联网，则获取网络时间&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; currentTime = GetNetworkTime();&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 如果没有连接到互联网，则获取本地时间&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; currentTime = DateTime.Now;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Debug.Log(&amp;quot;当前时间：&amp;quot; + currentTime);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; private DateTime GetNetworkTime()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 从 NTP Pool Project 获取网络时间&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const string ntpServer = &amp;quot;pool.ntp.org&amp;quot;;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var ntpData = new byte[48];// 创建一个 48 字节大小的字节数组来存储 NTP 数据&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ntpData[0] = 0x1B;// 将 NTP 数据的第一个字节设置为 0x1B，这是 NTP 协议的请求数据格式&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var addresses = Dns.GetHostEntry(ntpServer).AddressList;// 获取 NTP 服务器的 IP 地址列表&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var ipEndPoint = new IPEndPoint(addresses[0], 123);// 创建用于连接的 IP 端点，使用第一个 IP 地址和 NTP 服务器的端口 123&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var socket = new System.Net.Sockets.Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);// 创建套接字，使用 IPv4 地址族、数据报套接字类型和 UDP 协议类型&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; socket.Connect(ipEndPoint);// 连接到 NTP 服务器&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; socket.Send(ntpData);// 发送 NTP 数据&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; socket.Receive(ntpData);// 接收 NTP 响应数据&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; socket.Close();// 关闭套接字连接&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const byte serverReplyTime = 40;// 服务器响应时间在 NTP 数据中的偏移量&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ulong intPart = BitConverter.ToUInt32(ntpData, serverReplyTime);// 从 NTP 数据中获取无符号 32 位整数部分&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ulong fractPart = BitConverter.ToUInt32(ntpData, serverReplyTime + 4);// 从 NTP 数据中获取无符号 32 位小数部分&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// 交换整数部分和小数部分的字节顺序，以适应本地字节顺序&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; intPart = SwapEndianness(intPart);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fractPart = SwapEndianness(fractPart);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var milliseconds = (intPart * 1000) + ((fractPart * 1000) / 0x100000000L);// 将整数部分和小数部分转换为毫秒数&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var networkDateTime = (new DateTime(1900, 1, 1)).AddMilliseconds((long)milliseconds);// 根据毫秒数计算网络时间（从 1900 年 1 月 1 日开始计算）&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return networkDateTime;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception e)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Debug.LogWarning(&amp;quot;获取网络时间失败: &amp;quot; + e.Message);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return DateTime.Now;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp;// 交换字节顺序，将大端序转换为小端序或反之&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; private static uint SwapEndianness(ulong x)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return (uint)(((x &amp;amp; 0x000000ff) &amp;lt;&amp;lt; 24) +&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((x &amp;amp; 0x0000ff00) &amp;lt;&amp;lt; 8) +&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((x &amp;amp; 0x00ff0000) &amp;gt;&amp;gt; 8) +&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((x &amp;amp; 0xff000000) &amp;gt;&amp;gt; 24));&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Fri, 01 Sep 2023 12:08:01 +0800</pubDate></item><item><title>Untiy 控制timeline暂停播放</title><link>https://www.kalet.cn/post/900.html</link><description>&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;最近项目需要用到timeline 做一些小笔记&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;PlayableDirector 可以获取一个timeline的实例&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;需要引入一个命名空间 ：using UnityEngine.Playables;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;PlayableDirector Unity文档&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;控制播放的函数&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;PlayableDirector.Pause()&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 暂停&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;停止在当前时间&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;PlayableDirector.Play()&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;播放&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;暂停后继续播放，停止后重新播放&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;PlayableDirector.Stop()&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;停止&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;从初始时间播放&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;PlayableDirector.Resume()&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;继续&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;停止后无效，暂停后继续播放&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;2&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;4&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;播放状态的变量&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;PlayableDirector.initialTime&amp;nbsp; &amp;nbsp; &amp;nbsp;初始位置&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;PlayableDirector.duration&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 总长度&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;PlayableDirector.time&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 当前播放长度&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;2&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;跳转到时间位置&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; playable.Stop();&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; playable.initialTime = 10;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; playable.Play();&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;2&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;获取播放进度&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; float normalizedTime = (float)(playable.time / playable.duration);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;————————————————&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;版权声明：本文为CSDN博主「yqian1000」的原创文章，遵循CC 4.0 BY-SA版权协议，转载请附上原文出处链接及本声明。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;原文链接：https://blog.csdn.net/qq_33205561/article/details/100707421&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Fri, 18 Aug 2023 12:19:07 +0800</pubDate></item><item><title>【Unity】屏幕相关Screen类中的静态属性和方法 转载</title><link>https://www.kalet.cn/post/899.html</link><description>&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;1.静态属性&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;using System.Collections;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;using System.Collections.Generic;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;using UnityEngine;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;public class Lesson12 : MonoBehaviour&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; void Start()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //常用的&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //1.得到当前屏幕的分辨率&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; 得到的是显示器的分辨率&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Resolution r = Screen.currentResolution;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&amp;quot;宽：&amp;quot; + r.width + &amp;quot;高：&amp;quot; + r.height);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //2.屏幕窗口当前宽高&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; 得到的是Game窗口的宽高&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(Screen.width);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(Screen.height);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //3.设置屏幕休眠模式&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Screen.sleepTimeout = SleepTimeout.NeverSleep;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //不常用的&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //1.运行时是否全屏模式&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Screen.fullScreen = true;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //2.设置窗口模式&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; -独占全屏 FullScreeMode.ExclusiveFullScreen&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; -全屏窗口 FullScreeMode.FullScreenWindow&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; -最大化窗口 FullScreeMode.MaximizedWindow&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; -窗口模式 FullScreeMode.Windowed&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Screen.fullScreenMode = FullScreenMode.FullScreenWindow;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //3.移动设备屏幕转向相关&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; 允许自动旋转为左横向 （Home键在左侧 就是左横向）&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Screen.autorotateToLandscapeLeft = true;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; 允许自动旋转为右横向 （Home键在右侧 就是右横向）&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Screen.autorotateToLandscapeRight = true;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; 允许自动旋转为竖屏 （Home键在下 就是竖屏）&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Screen.autorotateToPortrait = true;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; 允许自动旋转为纵向倒着 （Home键在上 就是纵向倒着）&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Screen.autorotateToPortraitUpsideDown = true;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //4.指定屏幕显示方向&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; 定死了 只能左横向（Home键在左侧）&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Screen.orientation = ScreenOrientation.LandscapeLeft&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;2.静态方法&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;using System.Collections;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;using System.Collections.Generic;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;using UnityEngine;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;public class Lesson12 : MonoBehaviour&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; void Start()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //设置分辨率(一般移动设备不使用)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //参数1 宽&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //参数2 高&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //参数3 是否全屏&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Screen.SetResolution(1920, 1080, true);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;————————————————&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;版权声明：本文为CSDN博主「_ElecSheep」的原创文章，遵循CC 4.0 BY-SA版权协议，转载请附上原文出处链接及本声明。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;原文链接：https://blog.csdn.net/SEA_0825/article/details/126838520&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Fri, 28 Jul 2023 21:42:37 +0800</pubDate></item><item><title>unity使用协程简单实现渐明渐暗的过渡效果</title><link>https://www.kalet.cn/post/898.html</link><description>&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;一、前言&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;在游戏中，经常遇到不同关卡，不同场景之间的过渡，而渐明渐暗则是其中一种比较简单自然的过渡效果，本文则是介绍如何用协程实现此效果。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;二、原理&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;控制图片的不透明度实现渐明渐暗&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;使用协程可以在我们需要过渡的时候再调用，节省性能&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;三、步骤&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;场景UI中放一张黑色Image图片（布满屏幕）&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;新建一个脚本输入以下代码，挂在黑色图片上&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; private float speed = 2f;//渐明渐暗的速度&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; private Image image;//当前物体的image组件，记得加上using UnityEngine.UI的命名空间&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; private void Start()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image = transform.GetComponent&amp;lt;Image&amp;gt;();&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; StartCoroutine(BeBright());//开始渐明&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; Public void PassLevel()//通关或场景过渡时调用此函数使用渐暗效果&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; StartCoroutine(BeDark());&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; IEnumerator BeDark()//渐暗&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (1 - image.color.a &amp;gt; 0.05f)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image.color = Color.Lerp(image.color, new Color(0, 0, 0, 1), speed *Time.deltaTime);//用逐步增加图片不透明度来&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yield return null;//代表每一帧执行返回一次，相当于在update中执行，但比update要节省性能&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //在此可以写变暗之后的逻辑&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; IEnumerator BeBright()//渐明&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (image.color.a &amp;gt; 0.05f)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image.color = Color.Lerp(image.color, new Color(0, 0, 0, 0), speed *Time.deltaTime);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yield return null;//代表每一帧执行返回一次，相当于在update中执行，但比update要节省性能&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //在此可以写变明之后的逻辑&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;————————————————&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;版权声明：本文为CSDN博主「静风闲云」的原创文章，遵循CC 4.0 BY-SA版权协议，转载请附上原文出处链接及本声明。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap;&quot;&gt;原文链接：https://blog.csdn.net/AiZuoQueBuDong/article/details/126167168&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Sun, 25 Jun 2023 09:26:39 +0800</pubDate></item><item><title>AI绘图：常用镜头和视角</title><link>https://www.kalet.cn/post/897.html</link><description>&lt;h2 class=&quot;cl-artical-title&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0.5rem; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans CN&amp;quot;, sans-serif; font-weight: 500; line-height: 1.2; color: rgb(97, 97, 97); font-size: 2rem; padding: 20px 0px 10px; text-wrap: wrap;&quot;&gt;AI绘图：常用镜头和视角&lt;/h2&gt;&lt;div class=&quot;cl-card-tag&quot; style=&quot;box-sizing: border-box; color: rgb(153, 153, 153); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans CN&amp;quot;, sans-serif; text-wrap: wrap;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;&lt;a href=&quot;https://www.ppmy.cn/news.html&quot; class=&quot;text-muted&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(108, 117, 125) !important;&quot;&gt;news&lt;/a&gt;/&lt;span style=&quot;box-sizing: border-box;&quot;&gt;2023/6/19 16:39:59&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;cl-artical&quot; style=&quot;box-sizing: border-box; margin-bottom: 15px; padding: 1.5rem 0px 0px; color: rgb(102, 102, 102); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans CN&amp;quot;, sans-serif; text-wrap: wrap;&quot;&gt;&lt;article class=&quot;baidu_pl&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div id=&quot;article_content&quot; class=&quot;clearfix&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div id=&quot;content_views&quot; class=&quot;htmledit_views&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0.5rem; font-family: inherit; font-weight: 500; line-height: 1.2; color: inherit; font-size: 1.75rem; padding: 1.5rem 0px 0.5rem;&quot;&gt;镜头&lt;/h2&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Establishing Shot&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;通过宽广或超宽广的视角交待故事发生的大地理环境&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Master Shot&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;众多人物都能完整地出现在镜头里。&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Wide Shot&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;广角镜头。又称“长镜头” Long Shot。人物全身展现，但在画面中所占比例相对较少&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Ultrawide Shot&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;超广角镜头&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Low Angle Shot&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;低角度镜头&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Full Shot&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;全景镜头。从脚到头，展现人物全身。&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Medium Full Shot&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;中全景镜头。人物的膝盖以上（但在腰部以下）至头顶&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Cowboy Shot&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;牛仔镜头。从大腿中部至头顶&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Medium Shot&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;中景镜头。腰部以上（但在胸部之下）至头顶&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Medium Close Up Shot&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;中近景镜头。胸部至头顶&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Close Up Shot&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;特写镜头。仅头部（可挡住部分额头），并保证人物的眼睛与观众的视线一致&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Extreme Close Up Shot&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;极特写镜头。只展示人物特定部位，比如嘴唇、眼睛、耳朵、鼻子等，一般以眼睛为主&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Macro Shot&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;微距镜头。把微小的物体放大拍摄&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Cinematic Shot&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;电影镜头&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 0.5rem; font-family: inherit; font-weight: 500; line-height: 1.2; color: inherit; font-size: 1.75rem; padding: 1.5rem 0px 0.5rem;&quot;&gt;视角&lt;/h2&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Full Body View&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;全身视角。&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Frontal View&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;正视角。&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Aerial View&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;鸟瞰视角。&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Product View&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;产品视角。用于生成展示产品的图像，生成的产品图具有高度逼真的外观和细节&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Elevation Perspective&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;立体透视图。用于生成平面上的建筑物体，展现其形状、大小和布局&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Outer Space View&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 1rem; padding: 0.5rem 0px; line-height: 1.8rem;&quot;&gt;太空视角。可以看到较大范围的地球或其他星球&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/article&gt;&lt;/div&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Mon, 19 Jun 2023 16:40:36 +0800</pubDate></item><item><title>unity暂停游戏,退出游戏</title><link>https://www.kalet.cn/post/896.html</link><description>&lt;p&gt;1.暂停游戏。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Time.timeScale = 0;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;2.继续游戏。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Time.timeScale = 1;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;3.重新开始。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;using UnityEngine.SceneManagement;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;SceneManager.LoadScene (0);&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;其中，0,为游戏场景的索引号&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;4.退出游戏&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Application.Quit();&lt;/p&gt;&lt;p&gt;————————————————&lt;/p&gt;&lt;p&gt;版权声明：本文为CSDN博主「我在玩」的原创文章，遵循CC 4.0 BY-SA版权协议，转载请附上原文出处链接及本声明。&lt;/p&gt;&lt;p&gt;原文链接：https://blog.csdn.net/weixin_54891028/article/details/117280693&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Thu, 25 May 2023 20:07:52 +0800</pubDate></item><item><title>Civitai站模型管理软件(for stable diffusion webui/NovelAI)</title><link>https://www.kalet.cn/post/895.html</link><description>&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;strong&gt;正版软件 自主开发 支持试用 协助安装&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;上海撼天信息技术自用模型管理程序，经过完善后对外销售，调用Civitai的API接口。&lt;/p&gt;&lt;p&gt;可以把C站选定的模型加入收藏后，在本软件中一键下载并在本地建库，永久离线保存，防止网站上的模型下架而找不到或者无法快捷管理手上的数千个模型。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;ul class=&quot; list-paddingleft-2&quot; style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;p&gt;多模型自动分类管理(Checkpoint、LORA、POSES、TextualInversion等)；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;自定义收藏夹MyLiked；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;分页显示列表，列表彩色显示状态和类别；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;批量获取在线版本更新；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;一键部署到SD-WEBUI目录的功能，含预览图；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;批量下载示例照片和浏览查看，设为首页展示图；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;示例的正负tag词复制；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;模型文件的对比和选择升级，可选不同大小版本的ckpt、safetensors、pt等；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;模型的未下载、待更新、不一致等状态检索；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;HTTP转发服务配置功能；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;本地硬盘和局域网NAS中的SMB保存；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Aria2c多线程下载，理论上能跑满带宽(暂时可直联，不耗流量)；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;软件在线免费更新升级；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;支持全分辨率自适应大小；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;历史记录功能，记录每一次更新的版本信息（不含图片和模型文件本身）；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;针对绝版的模型，转移到历史库中进行保护，防止因为C站的模型收费和删除，导致在线更新时本地报废；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;错误日志功能，批量获取更新时如果某个模型多次出错，会记录下来方便检查，如果C站上已下架就放到历史库中；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;模型查找功能，可按模型ID精确查找或者按模型名称模糊查找；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;批量下载功能，点一次可以下载5条空目录的单文件模型，等待有下载进度后，可以继续点击下一批；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;任意转移功能，可以将模型转移到指定的同类型目录中，用减号分隔；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;自建目录分类，可以自已建立分类目录，与系统目录用减号加说明进行区分；&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;模型版本切换，可以选择更新为模型的任意版本，并且多版本的模型文件可以并存；&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;在线激活，无日期和模型数量限制(除非C站发生变故)，本地模型和图文为离线永久保存；&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;注：请确保有电脑基础，并能够正常打开C站，不提供除本软件使用及售后以外的其它技术支持，敬请谅解！&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://www.kalet.cn/zb_users/upload/2023/04/202304191681910764263063.jpg&quot; title=&quot;QQ图片20230419205145.jpg&quot; alt=&quot;QQ图片20230419205145.jpg&quot; width=&quot;500&quot; height=&quot;587&quot; border=&quot;0&quot; vspace=&quot;0&quot; style=&quot;width: 500px; height: 587px;&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #FF0000; font-size: 16px;&quot;&gt;&lt;strong&gt;软件费用为&lt;span style=&quot;color: #FF0000; font-size: 18px;&quot;&gt;300&lt;/span&gt;元，无时间和模型数量限制，可以试用一天。&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;有意者可以联系微信：150 218 00568 远程协助安装。&lt;/strong&gt;&lt;span style=&quot;color: #002060;&quot;&gt;&lt;strong style=&quot;color: rgb(255, 0, 0); font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;strong style=&quot;white-space: normal;&quot;&gt;或者在闲鱼上直接拍，有时会被拍了没补，偶尔还因为关键词被下架，如果找不到就加微信吧。&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Civitai管理软件视频演示教程：&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.kalet.cn/post/894.html&quot; target=&quot;_blank&quot;&gt;https://www.kalet.cn/post/894.html&lt;/a&gt;&lt;a href=&quot;https://www.bilibili.com/video/BV1ss4y1d7VV/&quot; _src=&quot;https://www.bilibili.com/video/BV1ss4y1d7VV/&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;br/&gt; &lt;p&gt;软件是收费的，置顶的kalet.cn个人博客中有小黄鱼的链接可以购买，没要您贵，一天的工资，小众软件，真正需要的人也更少（网上看着热闹但八成都是找图包的），所以只算补贴副业，没打算发财，而且是以公司名义销售，可开具发票，提供在线安装、售后，支持试用。因为多次更新后功能比初版多了近一倍，五一节后可能会调整回原价。&lt;/p&gt;&lt;p&gt;假设您手上有200G大小的100个模型，每月手工整理、下载更新和使用4次，每次花费4小时，就是2天的工作量，那1000、2000个呢？不下载过几天模型找不到了呢？下载回来对不上号了呢？对上号了没有示例了呢？&lt;/p&gt;&lt;p&gt;反正我是没办法才编程序去处理这些，只是功能越做越复杂，C站又改版又被那啥，工作量也超过预期。&lt;/p&gt;&lt;p&gt;按C站现在的发展趋势，收费或者被LSP们弄得吃官司而封掉是有可能的。至少能在它嘎了之前，把大佬们的作品拖回来家，建好自己的数以T计的模型库。&lt;/p&gt;&lt;p&gt;早就想做个小游戏，但美工不行，所以指望这项新技术能带来突破了。&lt;/p&gt;&lt;p&gt;谢谢您看这么多，也谢谢理解和支持！&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://www.kalet.cn/zb_users/upload/2023/04/202304191681910847917705.jpg&quot; style=&quot;&quot; title=&quot;snap002.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://www.kalet.cn/zb_users/upload/2023/04/202304191681910851101267.jpg&quot; style=&quot;&quot; title=&quot;snap003.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://www.kalet.cn/zb_users/upload/2023/04/202304191681910855359915.jpg&quot; style=&quot;&quot; title=&quot;snap004.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://www.kalet.cn/zb_users/upload/2023/04/202304191681910859546039.jpg&quot; style=&quot;&quot; title=&quot;snap005.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://www.kalet.cn/zb_users/upload/2023/04/202304191681910867220347.jpg&quot; style=&quot;&quot; title=&quot;snap006.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://www.kalet.cn/zb_users/upload/2023/04/202304191681910871859171.jpg&quot; style=&quot;&quot; title=&quot;snap007.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://www.kalet.cn/zb_users/upload/2023/04/202304191681910874371730.jpg&quot; style=&quot;&quot; title=&quot;snap008.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://www.kalet.cn/zb_users/upload/2023/04/202304191681910878516117.jpg&quot; style=&quot;&quot; title=&quot;snap009.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://www.kalet.cn/zb_users/upload/2023/04/202304191681910881618339.jpg&quot; style=&quot;&quot; title=&quot;snap010.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://www.kalet.cn/zb_users/upload/2023/04/202304191681910886568663.jpg&quot; style=&quot;&quot; title=&quot;snap011.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://www.kalet.cn/zb_users/upload/2023/04/202304191681910889620357.jpg&quot; style=&quot;&quot; title=&quot;snap012.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://www.kalet.cn/zb_users/upload/2023/04/202304191681910901829950.jpg&quot; style=&quot;&quot; title=&quot;snap013.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/div&gt;</description><pubDate>Wed, 19 Apr 2023 21:24:52 +0800</pubDate></item></channel></rss>