Compare commits
1 Commits
pgd/202507
...
pgd/202507
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
331156a592 |
@@ -939,7 +939,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: f421057c874e14f4aae3877101e22b47, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Toggle_ConstrainedProportions: {fileID: 0}
|
||||
--- !u!222 &5686305620952077922
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1527,82 +1526,6 @@ MonoBehaviour:
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &932005473230873431
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 231312439625808946}
|
||||
- component: {fileID: 4696361396688957287}
|
||||
- component: {fileID: 9174819864550016570}
|
||||
m_Layer: 5
|
||||
m_Name: Background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &231312439625808946
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 932005473230873431}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 7722089686495958689}
|
||||
m_Father: {fileID: 9110981658452818538}
|
||||
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: 0, y: 0}
|
||||
m_SizeDelta: {x: 20, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4696361396688957287
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 932005473230873431}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &9174819864550016570
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 932005473230873431}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: c03773fe82dedfa4e815f2685050213e, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &932382889524097303
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -7258,91 +7181,6 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &5507679931909402970
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 9110981658452818538}
|
||||
- component: {fileID: 7987888433761098133}
|
||||
m_Layer: 5
|
||||
m_Name: Toggle_ConstrainedProportions
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &9110981658452818538
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5507679931909402970}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 231312439625808946}
|
||||
m_Father: {fileID: 7850683753892271836}
|
||||
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: 35, y: 0}
|
||||
m_SizeDelta: {x: 20, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &7987888433761098133
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5507679931909402970}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 9174819864550016570}
|
||||
toggleTransition: 1
|
||||
graphic: {fileID: 144844548308267046}
|
||||
m_Group: {fileID: 0}
|
||||
onValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_IsOn: 0
|
||||
--- !u!1 &5520081107797894421
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -9509,81 +9347,6 @@ MonoBehaviour:
|
||||
isAlert: 0
|
||||
m_InputValidator: {fileID: 0}
|
||||
m_ShouldActivateOnSelect: 1
|
||||
--- !u!1 &6892363684820741957
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7722089686495958689}
|
||||
- component: {fileID: 7260756536176953475}
|
||||
- component: {fileID: 144844548308267046}
|
||||
m_Layer: 5
|
||||
m_Name: Checkmark
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7722089686495958689
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6892363684820741957}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 231312439625808946}
|
||||
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: 0, y: 0}
|
||||
m_SizeDelta: {x: 20, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7260756536176953475
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6892363684820741957}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &144844548308267046
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6892363684820741957}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: c771258b99e39f74ca26ab48980cd9a9, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &7077446315086675148
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -10139,8 +9902,7 @@ RectTransform:
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 9110981658452818538}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1353106044187488349}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
using Studio.AssetTool;
|
||||
using Studio.Command;
|
||||
using Studio.Conifg;
|
||||
using Studio.Core;
|
||||
using Studio.Manage;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using UnityEngine.UI;
|
||||
using XRLib.UI;
|
||||
using static UnityEngine.Rendering.DebugUI;
|
||||
using Studio.Manage;
|
||||
using System.Linq;
|
||||
using Studio.Core;
|
||||
using Studio.Command;
|
||||
using UnityEngine.UI;
|
||||
using System;
|
||||
using Studio.AssetTool;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using Studio.Conifg;
|
||||
|
||||
namespace Studio.UI
|
||||
{
|
||||
@@ -47,8 +46,7 @@ namespace Studio.UI
|
||||
private TMP_InputField InputField_ScaleZ;
|
||||
private TMP_InputField InputField_Name;
|
||||
private TMP_InputField InputField_ID;
|
||||
|
||||
public Toggle Toggle_ConstrainedProportions;
|
||||
|
||||
|
||||
private AddComponetModal addComponetModal;
|
||||
private ConnectionModal connectionModal;
|
||||
@@ -69,16 +67,11 @@ namespace Studio.UI
|
||||
private CustomAssetRenderObject singleSelectObject;
|
||||
private AddComponetDataScriptable componetScriptable;
|
||||
|
||||
private float scaleXValue;
|
||||
private float scaleYValue;
|
||||
private float scaleZValue;
|
||||
|
||||
private string componetKey;
|
||||
private string topic;
|
||||
private string code;
|
||||
private bool isAuto;
|
||||
private bool isConstrainedProportions;
|
||||
|
||||
public override void AfterAwake()
|
||||
{
|
||||
InputField_PositionX.onValueChanged.AddListener(OnPosXChanged);
|
||||
@@ -96,11 +89,10 @@ namespace Studio.UI
|
||||
InputField_RotationX.onDeselect.AddListener(OnDeselectInputField);
|
||||
InputField_RotationY.onDeselect.AddListener(OnDeselectInputField);
|
||||
InputField_RotationZ.onDeselect.AddListener(OnDeselectInputField);
|
||||
InputField_ScaleX.onDeselect.AddListener(OnDeselectScaleXInputField);
|
||||
InputField_ScaleY.onDeselect.AddListener(OnDeselectScaleYInputField);
|
||||
InputField_ScaleZ.onDeselect.AddListener(OnDeselectScaleZInputField);
|
||||
InputField_ScaleX.onDeselect.AddListener(OnDeselectInputField);
|
||||
InputField_ScaleY.onDeselect.AddListener(OnDeselectInputField);
|
||||
InputField_ScaleZ.onDeselect.AddListener(OnDeselectInputField);
|
||||
InputField_ID.onValueChanged.AddListener(OnChangedID);
|
||||
Toggle_ConstrainedProportions.onValueChanged.AddListener(OnConstrainedProportionsChanged);
|
||||
InputField_Name.readOnly = true;
|
||||
addComponetModal = GetComponentInChildren<AddComponetModal>();
|
||||
connectionModal = GetComponentInChildren<ConnectionModal>();
|
||||
@@ -153,15 +145,6 @@ namespace Studio.UI
|
||||
void OnScaXChanged(string input)
|
||||
{
|
||||
OnTransformChanged(InputFieldType.scaX, input);
|
||||
|
||||
if (isConstrainedProportions)
|
||||
{
|
||||
|
||||
OnTransformChanged(InputFieldType.scaY, input);
|
||||
InputField_ScaleY.SetTextWithoutNotify(input);
|
||||
OnTransformChanged(InputFieldType.scaZ, input);
|
||||
InputField_ScaleZ.SetTextWithoutNotify(input);
|
||||
}
|
||||
}
|
||||
void OnScaYChanged(string input)
|
||||
{
|
||||
@@ -171,10 +154,6 @@ namespace Studio.UI
|
||||
{
|
||||
OnTransformChanged(InputFieldType.scaZ, input);
|
||||
}
|
||||
void OnConstrainedProportionsChanged(bool isOn)
|
||||
{
|
||||
isConstrainedProportions = isOn;
|
||||
}
|
||||
void OnTransformChanged(InputFieldType type, string input)
|
||||
{
|
||||
if (selectedObjects.Count == 0)
|
||||
@@ -200,41 +179,6 @@ namespace Studio.UI
|
||||
|
||||
onTransformChanged?.Invoke(selectedObjects);
|
||||
}
|
||||
void OnTransformChangedScale(InputFieldType type, string input)
|
||||
{
|
||||
if (selectedObjects.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
float value = 0.0f;
|
||||
if (!float.TryParse(input, out value))
|
||||
{
|
||||
return;
|
||||
}
|
||||
switch (type)
|
||||
{
|
||||
case InputFieldType.scaX:
|
||||
float offset = value / scaleXValue;
|
||||
InputField_ScaleY.SetTextWithoutNotify((scaleYValue * offset).ToString());
|
||||
InputField_ScaleZ.SetTextWithoutNotify((scaleZValue * offset).ToString());
|
||||
break;
|
||||
case InputFieldType.scaY: break;
|
||||
case InputFieldType.scaZ: break;
|
||||
}
|
||||
if (lastSelectedInputField.type != type)
|
||||
{
|
||||
AddUndoRedo(type, value);
|
||||
}
|
||||
lastSelectedInputField.value = value;
|
||||
foreach (GameObject gb in selectedObjects)
|
||||
{
|
||||
ChangeTransformValue(gb.transform, type, value);
|
||||
}
|
||||
var renderObjectHandler = ManagerHub.instance.Get<RenderObjectHandler>();
|
||||
renderObjectHandler.ResetGizmoTargetObjects();
|
||||
|
||||
onTransformChanged?.Invoke(selectedObjects);
|
||||
}
|
||||
public void OnTransformChanged(List<GameObject> objectTransforms)
|
||||
{
|
||||
selectedObjects = objectTransforms;
|
||||
@@ -319,7 +263,8 @@ namespace Studio.UI
|
||||
case InputFieldType.scaZ: t.localScale = new Vector3(t.localScale.x, t.localScale.y, v); break;
|
||||
}
|
||||
}
|
||||
void ResetSelectedInput()
|
||||
|
||||
void OnDeselectInputField(string lastInput)
|
||||
{
|
||||
Debug.Log("Deselect Input Field");
|
||||
if (lastSelectedInputField.type != InputFieldType.none)
|
||||
@@ -327,35 +272,6 @@ namespace Studio.UI
|
||||
lastSelectedInputField = new SelectedInput(InputFieldType.none, 0.0f);
|
||||
}
|
||||
}
|
||||
void OnDeselectInputField(string lastInput)
|
||||
{
|
||||
ResetSelectedInput();
|
||||
|
||||
}
|
||||
void OnDeselectScaleXInputField(string lastInput)
|
||||
{
|
||||
ResetSelectedInput();
|
||||
if (float.TryParse(lastInput, out float input))
|
||||
{
|
||||
scaleXValue = input;
|
||||
}
|
||||
}
|
||||
void OnDeselectScaleYInputField(string lastInput)
|
||||
{
|
||||
ResetSelectedInput();
|
||||
if (float.TryParse(lastInput, out float input))
|
||||
{
|
||||
scaleYValue = input;
|
||||
}
|
||||
}
|
||||
void OnDeselectScaleZInputField(string lastInput)
|
||||
{
|
||||
ResetSelectedInput();
|
||||
if (float.TryParse(lastInput, out float input))
|
||||
{
|
||||
scaleZValue = input;
|
||||
}
|
||||
}
|
||||
|
||||
void OnChangedID(string Id)
|
||||
{
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System.Reflection;
|
||||
using System.Xml;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.UI.Extensions;
|
||||
using XRLib.UI;
|
||||
|
||||
namespace Studio.UI
|
||||
@@ -75,13 +72,10 @@ namespace Studio.UI
|
||||
{
|
||||
Vector2 mousePos = Input.mousePosition;
|
||||
|
||||
float bgSizeX = image_bg.sizeDelta.x / 2 * Screen.width / standardScreenWidth;
|
||||
float bgSizeY = image_bg.sizeDelta.y / 2 * Screen.height / standardScreenHeight;
|
||||
|
||||
float movePosX = (mousePos.x + bgSizeX);
|
||||
float bgSizeY = image_bg.sizeDelta.y * 1.3f * Screen.height / standardScreenHeight;
|
||||
float movePosY = mousePos.y - bgSizeY;
|
||||
|
||||
Vector2 movePos = new Vector2(movePosX, movePosY);
|
||||
Vector2 movePos = new Vector2(mousePos.x, movePosY);
|
||||
|
||||
image_bg.transform.position = movePos;
|
||||
text_tooltip.transform.position = movePos;
|
||||
|
||||
Reference in New Issue
Block a user