FairyGUI.UIPackage.LoadBinary C# (CSharp) Method

LoadBinary() private method

private LoadBinary ( string fileName ) : byte[]
fileName string
return byte[]
        byte[] LoadBinary(string fileName)
        {
            string ext = Path.GetExtension(fileName);
            fileName = _assetNamePrefix + Path.GetFileNameWithoutExtension(fileName);

            TextAsset ta;
            if (_resBundle != null)
            {
            #if UNITY_5
                ta = _resBundle.LoadAsset<TextAsset>(fileName);
            #else
                ta = (TextAsset)_resBundle.Load(fileName, typeof(TextAsset));
            #endif
            }
            else
                ta = (TextAsset)_loadFunc(fileName, ext, typeof(TextAsset));
            if (ta != null)
                return ta.bytes;
            else
                return null;
        }