Skip to content

Commit

Permalink
Updated GenUI, fixed duplicated ID0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbourgeois committed Jul 2, 2018
1 parent 69023c3 commit 8a17106
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
4 changes: 1 addition & 3 deletions Assets/Librairies/OCF.meta → Assets/Librairies/GenUI.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions Assets/Scenes/Main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ Prefab:
- target: {fileID: 224261597021104126, guid: 79c2718dd59243e4c90e145349e7dadf,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0.000015258789
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4679437618935694, guid: 79c2718dd59243e4c90e145349e7dadf, type: 2}
propertyPath: m_LocalEulerAnglesHint.y
Expand Down Expand Up @@ -278,7 +278,12 @@ Prefab:
type: 2}
- target: {fileID: 1277216160771640, guid: 79c2718dd59243e4c90e145349e7dadf, type: 2}
propertyPath: m_Name
value: OCF
value: GenUI
objectReference: {fileID: 0}
- target: {fileID: 224261597021104126, guid: 79c2718dd59243e4c90e145349e7dadf,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 79c2718dd59243e4c90e145349e7dadf, type: 2}
Expand Down Expand Up @@ -536,6 +541,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 549500f70af21674585d1c1e51ec43c9, type: 3}
m_Name:
m_EditorClassIdentifier:
BarColor: {r: 0.54509807, g: 0, b: 0.8207547, a: 1}
id: FakePointManager
folder:
debug: 0
Expand Down
11 changes: 9 additions & 2 deletions Assets/Scripts/FakePointManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void Update () {

_frameCounter++;

if (_oldWidth != Width && _oldHeight != Height)
if (_oldWidth != Width || _oldHeight != Height)
{
_oldWidth = Width;
_oldHeight = Height;
Expand Down Expand Up @@ -194,12 +194,16 @@ void Update () {
public void InstantiatePoint()
{
if (NbPoints <= 0) NbPoints = 0;


if (InstanceNumber < NbPoints)
{
_highestPid++;
InstanceNumber++;

if (_highestPid <= 0)
_highestPid = 1;

var newPoint = Instantiate(Prefab);

newPoint.GetComponent<MeshRenderer>().material.SetColor("_PointColor", Color.HSVToRGB(Random.value, 0.75f, 0.75f));
Expand All @@ -210,8 +214,8 @@ public void InstantiatePoint()
newPoint.transform.localScale = new Vector3(PointSize.x, PointSize.y, 2f);

InstanciatedPoints.Add(_highestPid, newPoint);



SendPersonEntered(InstanciatedPoints[_highestPid]);
}

Expand All @@ -224,6 +228,9 @@ public void InstantiatePoint()
InstanceNumber--;

}



}

private void ComputeOrthoCamera()
Expand Down
1 change: 0 additions & 1 deletion Assets/Scripts/FakePointManagerControllable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,5 @@ public override void OnUiValueChanged(string name)
{
base.OnUiValueChanged(name);
manager.PointSize = new Vector2(PointSizeX / Width, PointSizeY / Height);
manager.ChangeResolution();
}
}
1 change: 0 additions & 1 deletion ProjectSettings/GraphicsSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ GraphicsSettings:
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
Expand Down
2 changes: 1 addition & 1 deletion ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
m_EditorVersion: 2018.1.3f1
m_EditorVersion: 2018.1.6f1

0 comments on commit 8a17106

Please sign in to comment.