2015-10-30 02:41:37 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
2018-04-02 22:51:22 +00:00
|
|
|
|
namespace AssetStudio
|
2015-10-30 02:41:37 +00:00
|
|
|
|
{
|
2018-09-26 17:15:37 +00:00
|
|
|
|
public sealed class PlayerSettings : Object
|
2015-10-30 02:41:37 +00:00
|
|
|
|
{
|
2017-02-09 19:49:13 +00:00
|
|
|
|
public string companyName;
|
|
|
|
|
public string productName;
|
2015-10-30 02:41:37 +00:00
|
|
|
|
|
2018-11-07 21:00:53 +00:00
|
|
|
|
public PlayerSettings(ObjectReader reader) : base(reader)
|
2015-10-30 02:41:37 +00:00
|
|
|
|
{
|
2018-10-25 07:02:57 +00:00
|
|
|
|
if (version[0] > 5 || (version[0] == 5 && version[1] >= 4)) //5.4.0 nad up
|
2017-01-15 11:57:41 +00:00
|
|
|
|
{
|
2018-10-25 07:02:57 +00:00
|
|
|
|
var productGUID = reader.ReadBytes(16);
|
2017-01-15 11:57:41 +00:00
|
|
|
|
}
|
2018-05-02 18:41:47 +00:00
|
|
|
|
|
2018-10-25 07:02:57 +00:00
|
|
|
|
var AndroidProfiler = reader.ReadBoolean();
|
|
|
|
|
//bool AndroidFilterTouchesWhenObscured 2017.2 and up
|
|
|
|
|
//bool AndroidEnableSustainedPerformanceMode 2018 and up
|
2018-12-02 18:42:07 +00:00
|
|
|
|
reader.AlignStream();
|
2018-10-25 07:02:57 +00:00
|
|
|
|
int defaultScreenOrientation = reader.ReadInt32();
|
|
|
|
|
int targetDevice = reader.ReadInt32();
|
|
|
|
|
if (version[0] < 5 || (version[0] == 5 && version[1] < 3)) //5.3 down
|
|
|
|
|
{
|
|
|
|
|
if (version[0] < 5) //5.0 down
|
2018-05-02 18:41:47 +00:00
|
|
|
|
{
|
2018-10-25 07:02:57 +00:00
|
|
|
|
int targetPlatform = reader.ReadInt32(); //4.0 and up targetGlesGraphics
|
|
|
|
|
if (version[0] > 4 || (version[0] == 4 && version[1] >= 6)) //4.6 and up
|
|
|
|
|
{
|
|
|
|
|
var targetIOSGraphics = reader.ReadInt32();
|
|
|
|
|
}
|
2018-05-02 18:41:47 +00:00
|
|
|
|
}
|
2018-10-25 07:02:57 +00:00
|
|
|
|
int targetResolution = reader.ReadInt32();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var useOnDemandResources = reader.ReadBoolean();
|
2018-12-02 18:42:07 +00:00
|
|
|
|
reader.AlignStream();
|
2018-10-25 07:02:57 +00:00
|
|
|
|
}
|
|
|
|
|
if (version[0] > 3 || (version[0] == 3 && version[1] >= 5)) //3.5 and up
|
|
|
|
|
{
|
|
|
|
|
var accelerometerFrequency = reader.ReadInt32();
|
2015-10-30 02:41:37 +00:00
|
|
|
|
}
|
2018-04-06 15:57:36 +00:00
|
|
|
|
companyName = reader.ReadAlignedString();
|
|
|
|
|
productName = reader.ReadAlignedString();
|
2015-10-30 02:41:37 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|