Skip to content
Snippets Groups Projects
Commit 668ccf4c authored by John Schihada's avatar John Schihada
Browse files

Made some UI- and Code-Adjustments for better screenshots

parent 2faa1c57
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,8 @@ public class HideUI : MonoBehaviour
{
public KeyCode Key = KeyCode.F1;
//public KeyCode ScreenshotKey = KeyCode.F2;
public UnityStandardAssets.Characters.FirstPerson.FirstPersonController CamControl;
public bool LockOnly = true;
public MeshRenderer CursorRenderer;
......@@ -47,5 +49,10 @@ void Update()
}
/*
else if (Input.GetKeyDown(ScreenshotKey)) {
ScreenCapture.CaptureScreenshot("UFrameIT-Screenshots\\Unity_ScreenCapture\\Capture.png");
}
*/
}
}
......@@ -7,6 +7,7 @@ public class TaskCharakterAnimation : MonoBehaviour
public GameObject walkAroundObject;
public GameObject player;
public float radiusAroundObject;
public float talkingZoneDistance;
private Animator anim;
private Transform currentTransform;
......@@ -48,7 +49,7 @@ void Update()
int layerMask = LayerMask.GetMask("TalkingZone"); //only hit TalkingZone
//If Player is in TalkingZone: TaskCharacter should look to the Player, stop walking and enable enter-key for talking
if (Physics.Raycast(ray, out hit, 5f, layerMask))
if (Physics.Raycast(ray, out hit, talkingZoneDistance, layerMask))
{
this.walking = false;
this.standing = true;
......
......@@ -5,45 +5,38 @@
public class ToolModeText : MonoBehaviour
{
private bool timerActive { get; set; }
private float timer { get; set; }
private float timerDuration = 3.0f;
// Start is called before the first frame update
void Start()
{
//Show the Text that the MarkPointMode is active on startup
gameObject.GetComponentInChildren<UnityEngine.UI.Text>().CrossFadeAlpha(0.0f, 0.0f, false);
gameObject.GetComponentInChildren<UnityEngine.UI.Text>().CrossFadeAlpha(1.0f, 0.9f, false);
this.timerActive = true;
this.timer = 0;
CommunicationEvents.ToolModeChangedEvent.AddListener(OnToolModeChanged);
}
// Update is called once per frame
void Update()
{
//If the Timer is Active, check if timerDuration is reached and set the Text inactive
if (this.timerActive)
{
this.timer += Time.deltaTime;
if (this.timer >= this.timerDuration)
{
//gameObject.SetActive(false);
gameObject.GetComponentInChildren<UnityEngine.UI.Text>().CrossFadeAlpha(0.0f, 0.3f, false);
this.timerActive = false;
this.timer = 0;
}
}
}
void OnToolModeChanged(ToolMode ActiveToolMode) {
//When ToolMode changes: Start a new Timer for showing up the Text for it
gameObject.GetComponentInChildren<UnityEngine.UI.Text>().text = "ToolMode = " + ActiveToolMode;
//gameObject.SetActive(true);
gameObject.GetComponentInChildren<UnityEngine.UI.Text>().CrossFadeAlpha(1.0f, 0.3f, false);
this.timerActive = true;
this.timer = 0;
//When ToolMode changes: Change Text of active ToolMode
switch (ActiveToolMode) {
case ToolMode.MarkPointMode:
gameObject.GetComponentInChildren<UnityEngine.UI.Text>().text = "Point Mode";
break;
case ToolMode.CreateLineMode:
gameObject.GetComponentInChildren<UnityEngine.UI.Text>().text = "Distance Mode";
break;
case ToolMode.CreateAngleMode:
gameObject.GetComponentInChildren<UnityEngine.UI.Text>().text = "Angle Mode";
break;
case ToolMode.CreateRayMode:
gameObject.GetComponentInChildren<UnityEngine.UI.Text>().text = "Straight Mode";
break;
case ToolMode.ExtraMode:
gameObject.GetComponentInChildren<UnityEngine.UI.Text>().text = "Extra Mode";
break;
}
}
}
......@@ -1284,7 +1284,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 5e9e851c0e142814dac026a256ba2ac0, type: 3}
propertyPath: m_LocalPosition.x
value: -5
value: -1
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 5e9e851c0e142814dac026a256ba2ac0, type: 3}
propertyPath: m_LocalPosition.y
......@@ -1292,7 +1292,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 5e9e851c0e142814dac026a256ba2ac0, type: 3}
propertyPath: m_LocalPosition.z
value: -4
value: -8
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 5e9e851c0e142814dac026a256ba2ac0, type: 3}
propertyPath: m_LocalRotation.x
......@@ -2697,13 +2697,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 138245305}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 60, z: 0}
m_LocalRotation: {x: 0.53561664, y: 0.09193187, z: -0.096480295, w: 0.8338795}
m_LocalPosition: {x: 0, y: 50, z: -40}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 65.647, y: 6.9600005, z: -8.707001}
--- !u!1001 &138771250
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -42031,6 +42031,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
Key: 9
ScreenshotKey: 115
CamControl: {fileID: 750627222}
LockOnly: 0
CursorRenderer: {fileID: 1661088671}
......@@ -42047,7 +42048,6 @@ GameObject:
- component: {fileID: 5635158873214363572}
- component: {fileID: 5635158873214363575}
- component: {fileID: 5635158873214363573}
- component: {fileID: 5635158873214363570}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
......@@ -42055,18 +42055,6 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &5635158873214363570
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5635158873214363529}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fc5c3ad69a727824d9d57b8edd909a1a, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!222 &5635158873214363572
CanvasRenderer:
m_ObjectHideFlags: 0
......@@ -42125,8 +42113,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_Children:
- {fileID: 5635158873947301190}
m_Children: []
m_Father: {fileID: 5635158874059645979}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -42222,7 +42209,7 @@ RectTransform:
m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_Children: []
m_Father: {fileID: 5635158874059645979}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
......@@ -42269,167 +42256,12 @@ GameObject:
- component: {fileID: 5635158873875320957}
- component: {fileID: 5635158873875320955}
m_Layer: 5
m_Name: Image (2)
m_Name: Image (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!222 &5635158873947301188
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5635158873947301209}
m_CullTransparentMesh: 0
--- !u!224 &5635158873947301190
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5635158873947301209}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 5635158873214363574}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 14, y: 85}
m_SizeDelta: {x: 600, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5635158873947301191
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5635158873947301209}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Place Points
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 36
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_textAlignment: 258
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_firstOverflowCharacterIndex: -1
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_ignoreRectMaskCulling: 0
m_ignoreCulling: 1
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_VertexBufferAutoSizeReduction: 1
m_firstVisibleCharacter: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 5635158873947301191}
characterCount: 12
spriteCount: 0
spaceCount: 1
wordCount: 2
linkCount: 0
lineCount: 1
pageCount: 1
materialCount: 1
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0}
m_hasFontAssetChanged: 0
m_subTextObjects:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &5635158873947301209
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5635158873947301190}
- component: {fileID: 5635158873947301188}
- component: {fileID: 5635158873947301191}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!222 &5635158874006723668
CanvasRenderer:
m_ObjectHideFlags: 0
......@@ -42490,7 +42322,7 @@ RectTransform:
m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_Children: []
m_Father: {fileID: 5635158874059645979}
m_RootOrder: 1
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
......@@ -42537,7 +42369,7 @@ GameObject:
- component: {fileID: 5635158874006723671}
- component: {fileID: 5635158874006723669}
m_Layer: 5
m_Name: Image (1)
m_Name: Image (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
......@@ -42584,17 +42416,18 @@ RectTransform:
m_LocalScale: {x: 1, y: 6.6666665, z: 1}
m_Children:
- {fileID: 5635158873214363574}
- {fileID: 5635158874006723670}
- {fileID: 5635158873875320956}
- {fileID: 5635158874006723670}
- {fileID: 5635158874164527066}
- {fileID: 5635158875035872777}
- {fileID: 5635158874201952752}
m_Father: {fileID: 5635158874393229193}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 133, y: 2416}
m_SizeDelta: {x: -1820, y: -900}
m_AnchoredPosition: {x: 0, y: 2416}
m_SizeDelta: {x: -1554, y: -900}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5635158874164527064
MonoBehaviour:
......@@ -42716,16 +42549,16 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5635158874201952755}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 1.1111113, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 5635158874976817879}
m_RootOrder: 0
m_Father: {fileID: 5635158874059645979}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -437, y: -30}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -417}
m_SizeDelta: {x: 250, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5635158874201952753
......@@ -42741,14 +42574,14 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.9529412, g: 0.54509807, b: 0, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 16
m_FontSize: 26
m_FontStyle: 1
m_BestFit: 0
m_MinSize: 1
......@@ -42759,7 +42592,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: ToolMode = MarkPointMode
m_Text: Point Mode
--- !u!1 &5635158874201952755
GameObject:
m_ObjectHideFlags: 0
......@@ -42830,12 +42663,12 @@ RectTransform:
m_Children:
- {fileID: 5635158874059645979}
m_Father: {fileID: 5635158874976817879}
m_RootOrder: 1
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 100, y: 78.5}
m_SizeDelta: {x: -825.5, y: 1046.5}
m_AnchoredPosition: {x: 0, y: 78.5}
m_SizeDelta: {x: -1100, y: 1046.5}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5635158874393229238
MonoBehaviour:
......@@ -42962,7 +42795,6 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 5635158874201952752}
- {fileID: 5635158874393229193}
m_Father: {fileID: 5635158873183879058}
m_RootOrder: 1
......@@ -43239,7 +43071,7 @@ PrefabInstance:
- target: {fileID: 7002030793187184893, guid: 8590393c51194934a95cdc2075fc4dec,
type: 3}
propertyPath: m_LocalPosition.x
value: -4
value: -2
objectReference: {fileID: 0}
- target: {fileID: 7002030793187184893, guid: 8590393c51194934a95cdc2075fc4dec,
type: 3}
......@@ -43249,7 +43081,7 @@ PrefabInstance:
- target: {fileID: 7002030793187184893, guid: 8590393c51194934a95cdc2075fc4dec,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
value: -6
objectReference: {fileID: 0}
- target: {fileID: 7002030793187184893, guid: 8590393c51194934a95cdc2075fc4dec,
type: 3}
......@@ -43301,6 +43133,16 @@ PrefabInstance:
propertyPath: player
value:
objectReference: {fileID: 2056235280}
- target: {fileID: 6999573641170124239, guid: 8590393c51194934a95cdc2075fc4dec,
type: 3}
propertyPath: radiusAroundObject
value: 10
objectReference: {fileID: 0}
- target: {fileID: 6999573641170124239, guid: 8590393c51194934a95cdc2075fc4dec,
type: 3}
propertyPath: talkingZoneDistance
value: 10
objectReference: {fileID: 0}
- target: {fileID: 6999573640440716767, guid: 8590393c51194934a95cdc2075fc4dec,
type: 3}
propertyPath: m_Mesh
......@@ -43316,5 +43158,15 @@ PrefabInstance:
propertyPath: m_Mesh
value:
objectReference: {fileID: 0}
- target: {fileID: 5439856320987879120, guid: 8590393c51194934a95cdc2075fc4dec,
type: 3}
propertyPath: m_LocalScale.x
value: 2.5
objectReference: {fileID: 0}
- target: {fileID: 5439856320987879120, guid: 8590393c51194934a95cdc2075fc4dec,
type: 3}
propertyPath: m_LocalScale.z
value: 2.5
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8590393c51194934a95cdc2075fc4dec, type: 3}
......@@ -42,8 +42,8 @@ PlayerSettings:
m_SplashScreenLogos: []
m_VirtualRealitySplashScreen: {fileID: 0}
m_HolographicTrackingLossScreen: {fileID: 0}
defaultScreenWidth: 1024
defaultScreenHeight: 768
defaultScreenWidth: 1920
defaultScreenHeight: 1080
defaultScreenWidthWeb: 960
defaultScreenHeightWeb: 600
m_StereoRenderingPath: 0
......@@ -66,7 +66,7 @@ PlayerSettings:
androidStartInFullscreen: 1
androidRenderOutsideSafeArea: 0
androidBlitType: 0
defaultIsNativeResolution: 1
defaultIsNativeResolution: 0
macRetinaSupport: 1
runInBackground: 1
captureSingleScreen: 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment