コード例 #1
0
        public override ExportPointer CreateExportPointer(Object asset, bool isLocal)
        {
            if (isLocal)
            {
                throw new NotSupportedException();
            }

            MonoScript script = m_scripts[asset];

            if (!MonoScript.IsReadAssemblyName(script.File.Version, script.File.Flags) || s_unityEngine.IsMatch(script.AssemblyName))
            {
                if (MonoScript.IsReadNamespace(script.File.Version))
                {
                    int fileID = Compute(script.Namespace, script.ClassName);
                    return(new ExportPointer(fileID, UnityEngineGUID, AssetExporter.ToExportType(asset)));
                }
                else
                {
                    ScriptIdentifier scriptInfo = script.GetScriptID();
                    if (!scriptInfo.IsDefault)
                    {
                        int fileID = Compute(scriptInfo.Namespace, scriptInfo.Name);
                        return(new ExportPointer(fileID, UnityEngineGUID, AssetExporter.ToExportType(asset)));
                    }
                }
            }

            long exportID   = GetExportID(asset);
            GUID uniqueGUID = script.GUID;

            return(new ExportPointer(exportID, uniqueGUID, AssetExporter.ToExportType(asset)));
        }