Skip to content

Commit

Permalink
add a project wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
gulu_office committed Mar 21, 2018
1 parent 4700a3b commit 350323e
Show file tree
Hide file tree
Showing 268 changed files with 1,453 additions and 23 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 18 additions & 20 deletions Misc/UIDebugStats.cs → Assets/Misc/UIDebugStats.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#if !TENCENT_CHANNEL
using CodeStage.AdvancedFPSCounter;
#endif
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -64,9 +61,7 @@ public string PrintDict(ref Dictionary<string, double> accumulated, int count =
StringBuilder builder = new StringBuilder();
foreach (var p in l)
{
#if !TENCENT_CHANNEL
builder.AppendFormat("{0}{1,-40} \t{2:0.00} \t{3:0.00}\n", Indent, p.Key, p.Value, p.Value / (double)AFPSCounter.Instance.fpsCounter.newValue);
#endif
builder.AppendFormat("{0}{1,-40} \t{2:0.00} \t{3:0.00}\n", Indent, p.Key, p.Value, p.Value / (double)(1.0f / Time.deltaTime));
string concatName = string.Format("{0}:{1}", m_name, p.Key);
if (accumulated.ContainsKey(concatName))
{
Expand Down Expand Up @@ -114,9 +109,9 @@ public string PrintDictDouble()
StringBuilder builder = new StringBuilder();
foreach (var p in l)
{
#if !TENCENT_CHANNEL
builder.AppendFormat("{0, -25} \t{1:0.00} \t{2:0.00} \t{3}/{4} \t{5}\n", p.Key, p.Value.mElapsedTicks, p.Value.mElapsedTicks / (double)AFPSCounter.Instance.fpsCounter.newValue, p.Value.mRebuildCount, p.Value.mCalls, p.Value.mDrawCallNum / p.Value.mCalls);
#endif
builder.AppendFormat("{0, -25} \t{1:0.00} \t{2:0.00} \t{3}/{4} \t{5}\n",
p.Key, p.Value.mElapsedTicks, p.Value.mElapsedTicks / (double)(1.0f / Time.deltaTime), p.Value.mRebuildCount, p.Value.mCalls, p.Value.mDrawCallNum / p.Value.mCalls);

if (m_accumulated.ContainsKey(p.Key))
{
m_accumulated[p.Key] += p.Value.mElapsedTicks;
Expand All @@ -140,9 +135,6 @@ public string PrintDictDouble()
float m_lastUpdateTime = 0.0f;
void Update ()
{
if (!GlobalSwitches.UIDebuggingPanels)
return;

if (Time.time - m_lastUpdateTime >= 1.0f)
{
m_debugInfo = PrintDictDouble();
Expand All @@ -157,9 +149,6 @@ void Update ()

void OnGUI()
{
if (!GlobalSwitches.UIDebuggingPanels)
return;

if (!string.IsNullOrEmpty(m_debugInfo))
{
Rect r = new Rect(250, 60, Screen.width - 640, Screen.height - 120.0f);
Expand All @@ -176,13 +165,22 @@ void OnGUI()
int m_startFrame = -1;
public void StartStats()
{
if (enabled)
return;

enabled = true;
m_accumulated.Clear();
m_lastUpdateTime = Time.time;
m_startFrame = Time.frameCount;
}

public void StopStats()
{
if (!enabled)
return;

enabled = false;

List<KeyValuePair<string, double>> sortBuf = m_accumulated.ToList();
sortBuf.Sort(
delegate (KeyValuePair<string, double> pair1,
Expand All @@ -205,7 +203,7 @@ public void StopStats()

public void StartPanelUpdate()
{
if (!GlobalSwitches.UIDebuggingPanels)
if (!enabled)
return;

m_panelSW.Reset();
Expand All @@ -214,7 +212,7 @@ public void StartPanelUpdate()

public void StopPanelUpdate(string panelName, bool bRebuild, int drawCallNum)
{
if (!GlobalSwitches.UIDebuggingPanels)
if (!enabled)
return;

m_panelSW.Stop();
Expand All @@ -241,7 +239,7 @@ public void StopPanelUpdate(string panelName, bool bRebuild, int drawCallNum)

public void StartPanelWidget(string panelName)
{
if (!GlobalSwitches.UIDebuggingPanels)
if (!enabled)
return;

UITimingDict td = null;
Expand All @@ -256,7 +254,7 @@ public void StartPanelWidget(string panelName)

public void StopPanelWidget(string panelName, string widgetName)
{
if (!GlobalSwitches.UIDebuggingPanels)
if (!enabled)
return;

UITimingDict td = null;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions ProjectSettings/AudioManager.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!11 &1
AudioManager:
m_ObjectHideFlags: 0
m_Volume: 1
Rolloff Scale: 1
Doppler Factor: 1
Default Speaker Mode: 2
m_SampleRate: 0
m_DSPBufferSize: 0
m_VirtualVoiceCount: 512
m_RealVoiceCount: 32
m_SpatializerPlugin:
m_DisableAudio: 0
m_VirtualizeEffects: 1
6 changes: 6 additions & 0 deletions ProjectSettings/ClusterInputManager.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!236 &1
ClusterInputManager:
m_ObjectHideFlags: 0
m_Inputs: []
18 changes: 18 additions & 0 deletions ProjectSettings/DynamicsManager.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!55 &1
PhysicsManager:
m_ObjectHideFlags: 0
serializedVersion: 3
m_Gravity: {x: 0, y: -9.81, z: 0}
m_DefaultMaterial: {fileID: 0}
m_BounceThreshold: 2
m_SleepThreshold: 0.005
m_DefaultContactOffset: 0.01
m_DefaultSolverIterations: 6
m_DefaultSolverVelocityIterations: 1
m_QueriesHitBackfaces: 0
m_QueriesHitTriggers: 1
m_EnableAdaptiveForce: 0
m_EnablePCM: 1
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
7 changes: 7 additions & 0 deletions ProjectSettings/EditorBuildSettings.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1045 &1
EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes: []
14 changes: 14 additions & 0 deletions ProjectSettings/EditorSettings.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!159 &1
EditorSettings:
m_ObjectHideFlags: 0
serializedVersion: 3
m_ExternalVersionControlSupport: Visible Meta Files
m_SerializationMode: 2
m_DefaultBehaviorMode: 0
m_SpritePackerMode: 0
m_SpritePackerPaddingPower: 1
m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd
m_ProjectGenerationRootNamespace:
m_UserGeneratedProjectSuffix:
61 changes: 61 additions & 0 deletions ProjectSettings/GraphicsSettings.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!30 &1
GraphicsSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_Deferred:
m_Mode: 1
m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
m_DeferredReflections:
m_Mode: 1
m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
m_ScreenSpaceShadows:
m_Mode: 1
m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
m_LegacyDeferred:
m_Mode: 1
m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
m_DepthNormals:
m_Mode: 1
m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
m_MotionVectors:
m_Mode: 1
m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
m_LightHalo:
m_Mode: 1
m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
m_LensFlare:
m_Mode: 1
m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
m_AlwaysIncludedShaders:
- {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
m_CustomRenderPipeline: {fileID: 0}
m_TransparencySortMode: 0
m_TransparencySortAxis: {x: 0, y: 0, z: 1}
m_DefaultRenderingPath: 1
m_DefaultMobileRenderingPath: 1
m_TierSettings: []
m_LightmapStripping: 0
m_FogStripping: 0
m_InstancingStripping: 0
m_LightmapKeepPlain: 1
m_LightmapKeepDirCombined: 1
m_LightmapKeepDynamicPlain: 1
m_LightmapKeepDynamicDirCombined: 1
m_LightmapKeepShadowMask: 1
m_LightmapKeepSubtractive: 1
m_FogKeepLinear: 1
m_FogKeepExp: 1
m_FogKeepExp2: 1
m_AlbedoSwatchInfos: []
m_LightsUseLinearIntensity: 0
m_LightsUseColorTemperature: 0
Loading

0 comments on commit 350323e

Please sign in to comment.