当前位置: 首页>>代码示例>>C#>>正文


C# BinaryReader.ReadNameA4方法代码示例

本文整理汇总了C#中System.IO.BinaryReader.ReadNameA4方法的典型用法代码示例。如果您正苦于以下问题:C# BinaryReader.ReadNameA4方法的具体用法?C# BinaryReader.ReadNameA4怎么用?C# BinaryReader.ReadNameA4使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.IO.BinaryReader的用法示例。


在下文中一共展示了BinaryReader.ReadNameA4方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadName

 public static string LoadName(Stream stream)
 {
     try
     {
         BinaryReader reader = new BinaryReader(stream);
         return reader.ReadNameA4();
     }
     catch
     {
         return null;
     }
 }
开发者ID:hejob,项目名称:SB3Utility,代码行数:12,代码来源:Avatar.cs

示例2: LoadFrom

        public void LoadFrom(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);
            m_Name = reader.ReadNameA4();
            m_ControllerSize = reader.ReadUInt32();
            m_Controller = new ControllerConstant(stream);

            int tosSize = reader.ReadInt32();
            m_TOS = new List<KeyValuePair<uint, string>>(tosSize);
            for (int i = 0; i < tosSize; i++)
            {
                m_TOS.Add(new KeyValuePair<uint, string>(reader.ReadUInt32(), reader.ReadNameA4()));
            }

            int numClips = reader.ReadInt32();
            m_AnimationClips = new List<PPtr<AnimationClip>>(numClips);
            for (int i = 0; i < numClips; i++)
            {
                m_AnimationClips.Add(new PPtr<AnimationClip>(stream, file));
            }
        }
开发者ID:hejob,项目名称:SB3Utility,代码行数:21,代码来源:AnimatorController.cs

示例3: LoadFrom

 public void LoadFrom(Stream stream)
 {
     BinaryReader reader = new BinaryReader(stream);
     name = reader.ReadNameA4();
     nameHash = reader.ReadUInt32();
     frameIndex = reader.ReadInt32();
     frameCount = reader.ReadInt32();
 }
开发者ID:hejob,项目名称:SB3Utility,代码行数:8,代码来源:Mesh.cs

示例4: LoadFrom

 public void LoadFrom(Stream stream)
 {
     BinaryReader reader = new BinaryReader(stream);
     m_Name = reader.ReadNameA4();
     m_Format = reader.ReadInt32();
     m_Type = reader.ReadInt32();
     m_3D = reader.ReadBoolean();
     m_UseHardware = reader.ReadBoolean();
     reader.ReadBytes(2);
     m_Stream = reader.ReadInt32();
     m_AudioData = reader.ReadBytes(reader.ReadInt32());
 }
开发者ID:hejob,项目名称:SB3Utility,代码行数:12,代码来源:AudioClip.cs

示例5: AssetBundleScriptInfo

 public AssetBundleScriptInfo(Stream stream)
 {
     BinaryReader reader = new BinaryReader(stream);
     className = reader.ReadNameA4();
     nameSpace = reader.ReadNameA4();
     assemblyName = reader.ReadNameA4();
     hash = reader.ReadUInt32();
 }
开发者ID:hejob,项目名称:SB3Utility,代码行数:8,代码来源:AssetBundle.cs

示例6: LoadFrom

        public void LoadFrom(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);
            m_Name = reader.ReadNameA4();

            int numObjects = reader.ReadInt32();
            m_PreloadTable = new List<PPtr<Object>>(numObjects);
            for (int i = 0; i < numObjects; i++)
            {
                PPtr<Object> objPtr = new PPtr<Object>(stream);
                if (objPtr.m_FileID == 0)
                {
                    Component comp = file.FindComponent(objPtr.m_PathID, false);
                    if (comp == null)
                    {
                        comp = new NotLoaded(file, objPtr.m_PathID, 0, 0);
                    }
                    objPtr = new PPtr<Object>(comp);
                }
                m_PreloadTable.Add(objPtr);
            }

            int numContainerEntries = reader.ReadInt32();
            m_Container = new List<KeyValuePair<string, AssetInfo>>(numContainerEntries);
            for (int i = 0; i < numContainerEntries; i++)
            {
                m_Container.Add
                (
                    new KeyValuePair<string, AssetInfo>
                    (
                        reader.ReadNameA4(), new AssetInfo(file, stream)
                    )
                );
            }

            m_MainAsset = new AssetInfo(file, stream);

            int numScriptComps = reader.ReadInt32();
            m_ScriptCompatibility = new AssetBundleScriptInfo[numScriptComps];
            for (int i = 0; i < numScriptComps; i++)
            {
                m_ScriptCompatibility[i] = new AssetBundleScriptInfo(stream);
            }

            int numClassComps = reader.ReadInt32();
            m_ClassCompatibility = new KeyValuePair<int, uint>[numClassComps];
            for (int i = 0; i < numClassComps; i++)
            {
                m_ClassCompatibility[i] = new KeyValuePair<int, uint>
                (
                    reader.ReadInt32(), reader.ReadUInt32()
                );
            }

            m_RuntimeCompatibility = reader.ReadUInt32();
        }
开发者ID:hejob,项目名称:SB3Utility,代码行数:56,代码来源:AssetBundle.cs

示例7: LoadFrom

        public void LoadFrom(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);
            m_Name = reader.ReadNameA4();
            m_AvatarSize = reader.ReadUInt32();
            m_Avatar = new AvatarConstant(stream);

            int numTOS = reader.ReadInt32();
            m_TOS = new List<KeyValuePair<uint, string>>(numTOS);
            for (int i = 0; i < numTOS; i++)
            {
                m_TOS.Add(new KeyValuePair<uint, string>(reader.ReadUInt32(), reader.ReadNameA4()));
            }
        }
开发者ID:hejob,项目名称:SB3Utility,代码行数:14,代码来源:Avatar.cs

示例8: LoadFrom

        public void LoadFrom(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);
            m_Name = reader.ReadNameA4();
            m_Shader = new PPtr<Shader>(stream, file);

            int numShaderKeywords = reader.ReadInt32();
            m_ShaderKeywords = new List<string>(numShaderKeywords);
            for (int i = 0; i < numShaderKeywords; i++)
            {
                m_ShaderKeywords.Add(reader.ReadNameA4());
            }

            m_CustomRenderQueue = reader.ReadInt32();
            m_SavedProperties = new UnityPropertySheet(file, stream);
        }
开发者ID:hejob,项目名称:SB3Utility,代码行数:16,代码来源:Material.cs

示例9: LoadFrom

 public void LoadFrom(Stream stream)
 {
     BinaryReader reader = new BinaryReader(stream);
     m_Name = reader.ReadNameA4();
     m_Rect = new Rectf(stream);
     m_Offset = reader.ReadVector2();
     m_Border = reader.ReadVector4();
     m_PixelsToUnits = reader.ReadSingle();
     m_Extrude = reader.ReadUInt32();
     m_RD = new SpriteRenderData(file, stream);
 }
开发者ID:hejob,项目名称:SB3Utility,代码行数:11,代码来源:Sprite.cs

示例10: GetAssetNames

 public string[] GetAssetNames(bool filter)
 {
     string[] assetNames = new string[Parser.Cabinet.Components.Count];
     using (BinaryReader reader = new BinaryReader(File.OpenRead(Parser.FilePath)))
     {
         Stream stream = reader.BaseStream;
         for (int i = 0; i < Parser.Cabinet.Components.Count; i++)
         {
             NotLoaded comp = Parser.Cabinet.Components[i] as NotLoaded;
             if (comp == null)
             {
                 Component subfile = Parser.Cabinet.Components[i];
                 assetNames[i] = AssetCabinet.ToString(subfile);
                 continue;
             }
             if (comp.Name == null)
             {
                 stream.Position = comp.offset;
                 switch (comp.classID1)
                 {
                 case UnityClassID.AssetBundle:
                 case UnityClassID.Avatar:
                 case UnityClassID.Mesh:
                     if (!filter)
                     {
                         comp.Name = reader.ReadNameA4();
                     }
                     break;
                 case UnityClassID.AudioClip:
                 case UnityClassID.AnimationClip:
                 case UnityClassID.AnimatorController:
                 case UnityClassID.AnimatorOverrideController:
                 case UnityClassID.Cubemap:
                 case UnityClassID.Material:
                 case UnityClassID.Shader:
                 case UnityClassID.Sprite:
                 case UnityClassID.TextAsset:
                 case UnityClassID.Texture2D:
                     comp.Name = reader.ReadNameA4();
                     break;
                 case UnityClassID.MonoScript:
                     comp.Name = comp.pathID + " / " + reader.ReadNameA4();
                     break;
                 case UnityClassID.Animator:
                 case UnityClassID.EllipsoidParticleEmitter:
                 case UnityClassID.Light:
                 case UnityClassID.ParticleAnimator:
                 case UnityClassID.ParticleRenderer:
                 case UnityClassID.ParticleSystem:
                 case UnityClassID.ParticleSystemRenderer:
                     comp.Name = GetNameFromGameObject(filter, stream);
                     break;
                 default:
                     if ((int)comp.classID1 <= -1 && comp.classID2 == UnityClassID.MonoBehaviour)
                     {
                         comp.Name = GetNameFromGameObject(filter, stream);
                         if (comp.Name == null)
                         {
                             comp.Name = MonoBehaviour.LoadName(stream);
                         }
                     }
                     break;
                 case UnityClassID.AudioListener:
                 case UnityClassID.AudioSource:
                 case UnityClassID.BoxCollider:
                 case UnityClassID.Camera:
                 case UnityClassID.CapsuleCollider:
                 case UnityClassID.FlareLayer:
                 case UnityClassID.LinkToGameObject:
                 case UnityClassID.LinkToGameObject223:
                 case UnityClassID.LinkToGameObject225:
                 case UnityClassID.MeshCollider:
                 case UnityClassID.MeshFilter:
                 case UnityClassID.MeshRenderer:
                 case UnityClassID.MultiLink:
                 case UnityClassID.Projector:
                 case UnityClassID.Rigidbody:
                 case UnityClassID.SkinnedMeshRenderer:
                 case UnityClassID.SphereCollider:
                 case UnityClassID.SpriteRenderer:
                 case UnityClassID.Transform:
                     if (!filter)
                     {
                         comp.Name = GetNameFromGameObject(true, stream);
                     }
                     break;
                 case UnityClassID.GameObject:
                     if (!filter || IsVirtualAnimator(comp))
                     {
                         comp.Name = GameObject.LoadName(stream);
                     }
                     break;
                 }
             }
             assetNames[i] = comp.Name != null ? comp.Name : comp.pathID.ToString();
         }
     }
     return assetNames;
 }
开发者ID:hejob,项目名称:SB3Utility,代码行数:99,代码来源:Unity3dEditor.cs

示例11: LoadFrom

 public void LoadFrom(Stream stream)
 {
     BinaryReader reader = new BinaryReader(stream);
     m_Name = reader.ReadNameA4();
     m_Width = reader.ReadInt32();
     m_Height = reader.ReadInt32();
     m_CompleteImageSize = reader.ReadInt32();
     m_TextureFormat = (TextureFormat)reader.ReadInt32();
     m_MipMap = reader.ReadBoolean();
     m_isReadable = reader.ReadBoolean();
     m_ReadAllowed = reader.ReadBoolean();
     reader.ReadByte();
     m_ImageCount = reader.ReadInt32();
     m_TextureDimension = reader.ReadInt32();
     m_TextureSettings = new GLTextureSettings(stream);
     m_LightmapFormat = reader.ReadInt32();
     m_ColorSpace = reader.ReadInt32();
     int size = reader.ReadInt32();
     image_data = reader.ReadBytes(size);
     reader.ReadBytes(4 - size & 3);
 }
开发者ID:hejob,项目名称:SB3Utility,代码行数:21,代码来源:Texture2D.cs

示例12: LoadName

 public static string LoadName(Stream stream)
 {
     BinaryReader reader = new BinaryReader(stream);
     return reader.ReadNameA4();
 }
开发者ID:hejob,项目名称:SB3Utility,代码行数:5,代码来源:Texture2D.cs

示例13: LoadFrom

        public void LoadFrom(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);
            m_Name = reader.ReadNameA4();
            m_Script = reader.ReadNameA4();
            m_PathName = reader.ReadNameA4();

            int numDependencies = reader.ReadInt32();
            m_Dependencies = new List<PPtr<Shader>>(numDependencies);
            for (int i = 0; i < numDependencies; i++)
            {
                m_Dependencies.Add(new PPtr<Shader>(stream, file));
            }

            m_ShaderIsBaked = reader.ReadBoolean();
            reader.ReadBytes(3);
        }
开发者ID:hejob,项目名称:SB3Utility,代码行数:17,代码来源:Shader.cs

示例14: LoadName

        public static string LoadName(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);

            int numComponents = reader.ReadInt32();
            for (int i = 0; i < numComponents; i++)
            {
                reader.ReadInt32();
                new PPtr<Component>(stream);
            }

            reader.ReadUInt32();
            return reader.ReadNameA4();
        }
开发者ID:hejob,项目名称:SB3Utility,代码行数:14,代码来源:GameObject.cs

示例15: LoadFrom

        public void LoadFrom(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);

            int numComponents = reader.ReadInt32();
            m_Component = new List<KeyValuePair<UnityClassID, PPtr<Component>>>(numComponents);
            for (int i = 0; i < numComponents; i++)
            {
                m_Component.Add
                (
                    new KeyValuePair<UnityClassID, PPtr<Component>>
                    (
                        (UnityClassID)reader.ReadInt32(),
                        new PPtr<Component>(stream, file)
                    )
                );
            }

            m_Layer = reader.ReadUInt32();
            m_Name = reader.ReadNameA4();
            m_Tag = reader.ReadUInt16();
            m_isActive = reader.ReadBoolean();
        }
开发者ID:hejob,项目名称:SB3Utility,代码行数:23,代码来源:GameObject.cs


注:本文中的System.IO.BinaryReader.ReadNameA4方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。