Commit b0864523 authored by ATREVI Dieudonne's avatar ATREVI Dieudonne
Browse files

- Update user's Doc

- Add resolution into the config panel
- Improve the user interface
parent ffe9e582
fileFormatVersion: 2
guid: 1846b4a6021d3ac449c7a6b24af5688f
timeCreated: 1452696482
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
......@@ -409,9 +409,9 @@ public class LoadEnv : MonoBehaviour
if (Input.GetKeyDown(KeyCode.Space))
{
if (Time.timeScale == 0)
Time.timeScale = 1;
menuM.Play();
else
Time.timeScale = 0;
menuM.Pause();
}
// --------------------------
......
......@@ -44,7 +44,7 @@ public class MenuManager : MonoBehaviour
Dropdown configFilesMenu; // GUI object to select the scenario
GameObject menu; // the menu gameObject
public GameObject panel; // the panel gameObject
GameObject controlPanel; // The play, pause and stop control panel
public static GameObject controlPanel; // The play, pause and stop control panel
public GameObject configPanel; // the panel to set the config parameters
public GameObject topMenuPanel; // the top menu panel
public GameObject slider; // Slider for the progress state bar
......@@ -87,6 +87,8 @@ public class MenuManager : MonoBehaviour
public void Play()
{
Time.timeScale = 1;
controlPanel = GameObject.Find("/controlCanvas/buttonControlPanel");
controlPanel.transform.Find("play").GetComponent<Button>().Select();
}
/// <summary>
......@@ -95,7 +97,8 @@ public class MenuManager : MonoBehaviour
public void Pause()
{
Time.timeScale = 0;
controlPanel = GameObject.Find("/controlCanvas/buttonControlPanel");
controlPanel.transform.Find("pause").GetComponent<Button>().Select();
}
/// <summary>
......@@ -253,7 +256,7 @@ public class MenuManager : MonoBehaviour
controlPanel.SetActive(!controlPanel.activeSelf);
//slider.SetActive(!panel.activeSelf);
topMenuPanel.SetActive(true);
Time.timeScale = 1; // start after the parameters modification
Play(); // start after the parameters modification
}
/// <summary>
......
......@@ -58,11 +58,6 @@ public class ConfigManager : MonoBehaviour
PanelCamera.transform.Find("RotY").GetComponent<InputField>().text = camRot.y.ToString();
PanelCamera.transform.Find("RotZ").GetComponent<InputField>().text = camRot.z.ToString();
// Resolution
Vector2 camRes = ConfigReader.camResolution;
PanelCamera.transform.Find("W").GetComponent<InputField>().text = camRes.x.ToString();
PanelCamera.transform.Find("H").GetComponent<InputField>().text = camRes.y.ToString();
// Look At Agent
PanelCamera.transform.Find("LookAgentID").GetComponent<InputField>().text = ConfigReader.camLookAtTarget.ToString();
......@@ -82,6 +77,10 @@ public class ConfigManager : MonoBehaviour
// FPS
PanelTimeSetting.transform.Find("fps").GetComponent<InputField>().text = ConfigReader.recordingFramerate.ToString();
// Resolution
PanelRecording.transform.Find("W").GetComponent<InputField>().text = ConfigReader.recordingWidth.ToString();
PanelRecording.transform.Find("H").GetComponent<InputField>().text = ConfigReader.recordingHeight.ToString();
// Save Path
PanelRecording.transform.Find("savedirVal").GetComponent<Text>().text = ConfigReader.recordingSaveDir;
......@@ -125,13 +124,6 @@ public class ConfigManager : MonoBehaviour
ConfigReader.camRotation = camRot;
// Resolution
Vector2 camRes;
camRes.x = float.Parse(PanelCamera.transform.Find("W").GetComponent<InputField>().text);
camRes.y = float.Parse(PanelCamera.transform.Find("H").GetComponent<InputField>().text);
ConfigReader.camResolution = camRes;
// Look At Agent
ConfigReader.camLookAtTarget = int.Parse(PanelCamera.transform.Find("LookAgentID").GetComponent<InputField>().text);
......@@ -158,6 +150,10 @@ public class ConfigManager : MonoBehaviour
ConfigReader.recordingEnd = 0;
}
// Resolution
ConfigReader.recordingWidth = int.Parse(PanelRecording.transform.Find("W").GetComponent<InputField>().text);
ConfigReader.recordingHeight = int.Parse(PanelRecording.transform.Find("H").GetComponent<InputField>().text);
// Save Datas
ConfigReader.imgOriginal.record = PanelRecording.transform.Find("imgOri").GetComponent<Toggle>().isOn;
ConfigReader.imgSegmentation.record = PanelRecording.transform.Find("imgSeg").GetComponent<Toggle>().isOn;
......
......@@ -212,18 +212,20 @@ public static class ConfigReader
set { data.recording.saveDir = value;}
}
/// <summary>
/// time to start the recording of the animation
/// Width of the image resolution
/// </summary>
static public int recordingWidth
{
get { return data.recording.width; }
set { data.recording.width = value;}
}
/// <summary>
/// time to start the recording of the animation
/// Height of the image resolution
/// </summary>
static public int recordingHeight
{
get { return data.recording.height; }
set { data.recording.height = value;}
}
/// <summary>
......
No preview for this file type
......@@ -34,3 +34,18 @@ The following packages were updated:
com.unity.package-manager-ui from version 2.0.7 to 2.2.0
com.unity.purchasing from version 2.0.3 to 2.0.6
com.unity.textmeshpro from version 1.4.1 to 2.0.1
=== Wed Apr 1 11:30:07 2020
Packages were changed.
Update Mode: updateDependencies
The following packages were updated:
com.unity.analytics from version 3.3.2 to 3.3.5
com.unity.ide.rider from version 1.1.0 to 1.1.4
com.unity.ide.vscode from version 1.1.0 to 1.1.4
com.unity.multiplayer-hlapi from version 1.0.2 to 1.0.4
com.unity.test-framework from version 1.0.13 to 1.1.11
com.unity.timeline from version 1.1.0 to 1.2.10
The following packages were removed:
com.unity.package-manager-ui@2.2.0
......@@ -3,17 +3,16 @@
"com.unity.2d.sprite": "1.0.0",
"com.unity.2d.tilemap": "1.0.0",
"com.unity.ads": "2.0.8",
"com.unity.analytics": "3.3.2",
"com.unity.analytics": "3.3.5",
"com.unity.collab-proxy": "1.2.16",
"com.unity.ext.nunit": "1.0.0",
"com.unity.ide.rider": "1.1.0",
"com.unity.ide.vscode": "1.1.0",
"com.unity.multiplayer-hlapi": "1.0.2",
"com.unity.package-manager-ui": "2.2.0",
"com.unity.ide.rider": "1.1.4",
"com.unity.ide.vscode": "1.1.4",
"com.unity.multiplayer-hlapi": "1.0.4",
"com.unity.purchasing": "2.0.6",
"com.unity.test-framework": "1.0.13",
"com.unity.test-framework": "1.1.11",
"com.unity.textmeshpro": "2.0.1",
"com.unity.timeline": "1.1.0",
"com.unity.timeline": "1.2.10",
"com.unity.ugui": "1.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
......
m_EditorVersion: 2019.2.3f1
m_EditorVersionWithRevision: 2019.2.3f1 (8e55c27a4621)
m_EditorVersion: 2019.3.1f1
m_EditorVersionWithRevision: 2019.3.1f1 (89d6087839c2)
......@@ -8,19 +8,19 @@
<rotation x="0" y="0" z="0" />
</env_stageInfos>
<cam>
<position x="-27.753" y="-3" z="5" />
<rotation x="30.00001" y="0" z="90" />
<position x="-30" y="-3" z="5" />
<rotation x="30.00002" y="0" z="90" />
<lookAtAgent agentID="-1" />
<followAgent agentID="0" followOnX="true" followOnY="false" />
<CamResolution x="-1" y="-1" />
</cam>
<recording start="1" end="4" framerate="15" width="-1" height="-1">
<recording start="0" end="0" framerate="15" width="320" height="240">
<saveImgOriginal record="true" quality="8" width="-1" height="-1" />
<saveImgSegmentation record="false" quality="8" width="-1" height="-1" />
<saveImgCategories record="false" quality="8" width="-1" height="-1" />
<saveImgDepth record="false" quality="8" width="-1" height="-1" minDepth="0" maxDepth="50" exponent="1" />
<saveImgNormals record="false" quality="8" width="-1" height="-1" />
<saveImgOpticalFlow record="true" quality="8" width="-1" height="-1" motionVector="false" />
<saveImgOpticalFlow record="false" quality="8" width="-1" height="-1" motionVector="false" />
<saveBodyBoundingBoxes record="false" />
<saveHeadBoundingBoxes record="false" />
<saveDir>./Output/</saveDir>
......
<?xml version="1.0" encoding="utf-8"?>
<ConfigData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- Specify the directory with all the trajectory files -->
<ConfigData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env_filesPath>./Scenarios/ExampleTwoColors/</env_filesPath>
<env_obstFile>./Scenarios/Decor/obstExampleTwoColors.xml</env_obstFile>
<!-- Camera positioning -->
<env_stageInfos stageName="">
<file />
<position x="0" y="0" z="0" />
<rotation x="0" y="0" z="0" />
</env_stageInfos>
<cam>
<position x="0" y="0" z="30" />
<rotation x="90" y="0" z="0" />
<lookAtAgent agentID="-1" />
<followAgent agentID="-1" followOnX="false" followOnY="false" />
<CamResolution x="-1" y="-1" />
</cam>
<!-- Configure recording: save picture in the give directory from start to end with specific framerate -->
<recording start="0" end="0" framerate="15">
<recording start="0" end="0" framerate="15" width="-1" height="-1">
<saveImgOriginal record="true" quality="8" width="-1" height="-1" />
<saveImgSegmentation record="false" quality="8" width="-1" height="-1" />
<saveImgCategories record="false" quality="8" width="-1" height="-1" />
<saveImgDepth record="false" quality="8" width="-1" height="-1" minDepth="0" maxDepth="50" exponent="1" />
<saveImgNormals record="false" quality="8" width="-1" height="-1" />
<saveImgOpticalFlow record="false" quality="8" width="-1" height="-1" motionVector="false" />
<saveBodyBoundingBoxes record="false" />
<saveHeadBoundingBoxes record="false" />
<saveDir>./Output/</saveDir>
</recording>
<!-- Define the colors of the agents (agents not in the list get a random colors) -->
<AgentColorList>
<color firstAgent="0" step="1" lastAgent="191" red="1" green="0" blue="0" />
<color firstAgent="192" step="1" lastAgent="383" red="0" green="1" blue="0" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment