diff --git a/Assets/CableJointsAlgorithm.cs b/Assets/CableJointsAlgorithm.cs index 6c3c3df..14d11e5 100644 --- a/Assets/CableJointsAlgorithm.cs +++ b/Assets/CableJointsAlgorithm.cs @@ -7,28 +7,59 @@ public static class CableJointsAlgorithm { public static void TimeStep(List cables) { //handle each cable individually foreach (var cable in cables) { + float totalDist = 0; + //calculate new attachment points for all joints - for(var go = cable.firstRoller; go != null; go = go.GetComponent().linkTo) { + for (var go = cable.firstRoller; go != null; go = go.GetComponent().linkTo) { if (go.GetComponent().linkTo != null) { var dist = go.GetComponent(); var rp = go.GetComponent(); - var (left, right) = TangentCircleCircle(go, rp.linkTo); - - //TODO: assumes circles are flat for sufficiently small timesteps - var leftSurfaceDist = - (go.transform.TransformPoint(dist.anchor) - go.transform.TransformPoint(left)).magnitude; - var rightSurfaceDist = (dist.attachedRigidbody.transform.TransformPoint(dist.connectedAnchor) - - dist.attachedRigidbody.transform.TransformPoint(right)).magnitude; - - Debug.Log(go.name+": left dist: "+leftSurfaceDist+" right Dist: "+rightSurfaceDist); - - dist.anchor = left; - dist.connectedAnchor = right; + var (left, right) = rp.updateDistanceJoints(); + totalDist += dist.distance; + //Debug.Log(go.name+": left dist: "+leftSurfaceDist+" right Dist: "+rightSurfaceDist); } } + + Debug.Log("Total distance for cable: "+totalDist); } } + public static Vector2 TangentPointCircle(GameObject fixedPointObject, GameObject circleObject) { + var roller = circleObject.GetComponent(); + var fixedTransform = fixedPointObject.GetComponent().transform; + var rollerTransform = roller.transform; + + //assume round rollers only + var rollerRadius = rollerTransform.lossyScale.x / 2; + + Vector2 d = rollerTransform.Position2d() - fixedTransform.Position2d(); + + var dLen = d.magnitude; + if (dLen > rollerRadius) { + float alpha; + if (d.x >= 0) { + alpha = (float)Asin(d.y / dLen); + } + else { + alpha = (float)(PI - Asin(d.y / dLen)); + } + + float phi = (float)Asin(rollerRadius / dLen); + + if (roller.clockwise) { + alpha = (float)(alpha - PI / 2 - phi); + } + else { + alpha = (float)(alpha + PI / 2 + phi); + } + + var p1 = rollerTransform.Position2d() + rollerRadius * new Vector2((float)Cos(alpha), (float)Sin(alpha)); + + return rollerTransform.InverseTransformPoint(p1); + } + + throw new Exception("Overlapping Rollers Error"); + } public static (Vector2, Vector2) TangentCircleCircle(GameObject g1, GameObject g2) { var roller1 = g1.GetComponent(); @@ -37,8 +68,8 @@ public static class CableJointsAlgorithm { var t2 = g2.transform; //assume round rollers only - var r1 = t1.lossyScale.x/2; - var r2 = t2.lossyScale.x/2; + var r1 = t1.lossyScale.x / 2; + var r2 = t2.lossyScale.x / 2; Vector2 d = t2.Position2d() - t1.Position2d(); float r = r1 + r2; @@ -84,7 +115,6 @@ public static class CableJointsAlgorithm { var p2 = t2.Position2d() + r2 * new Vector2((float)Cos(alpha2), (float)Sin(alpha2)); return (t1.InverseTransformPoint(p1), t2.InverseTransformPoint(p2)); - } throw new Exception("Overlapping Rollers Error"); diff --git a/Assets/Controller.cs b/Assets/Controller.cs index 32f732b..ff5f604 100644 --- a/Assets/Controller.cs +++ b/Assets/Controller.cs @@ -6,14 +6,14 @@ using Unity.Collections; using Unity.VisualScripting; using UnityEditor; using UnityEngine; +using UnityEngine.UI; using FontWeight = TMPro.FontWeight; public class Controller : MonoBehaviour { private List cables = new(); //Initialize - void OnEnable() { - + void Awake() { var rotatableSprite = Resources.Load("Rotatable"); var fixedSprite = Resources.Load("Fixed"); var poweredSprite = Resources.Load("Powered"); @@ -24,27 +24,32 @@ public class Controller : MonoBehaviour { foreach (GameObject go in gameObjects) { RollerProperties rp = go.GetComponent(); if (rp != null) { - Rigidbody2D settings = go.GetOrAddComponent(); - - switch (rp.movement) { - case RollerProperties.RotationType.Rotatable: - go.GetComponent().sprite = rotatableSprite; - break; - case RollerProperties.RotationType.Fixed: - go.GetComponent().sprite = fixedSprite; - break; - case RollerProperties.RotationType.Free: - go.GetComponent().sprite = freeSprite; - break; - case RollerProperties.RotationType.Powered: - go.GetComponent().sprite = poweredSprite; - break; + if (!rp.useFixedAttachmentPoint) { + switch (rp.movement) { + case RollerProperties.RotationType.Rotatable: + go.GetComponent().sprite = rotatableSprite; + break; + case RollerProperties.RotationType.Fixed: + go.GetComponent().sprite = fixedSprite; + break; + case RollerProperties.RotationType.Free: + go.GetComponent().sprite = freeSprite; + break; + case RollerProperties.RotationType.Powered: + go.GetComponent().sprite = poweredSprite; + break; + } } - + + //collisions and physics + Rigidbody2D rigidbody = go.GetOrAddComponent(); + rigidbody.useAutoMass = true; // mass is based on size if (rp.movement == RollerProperties.RotationType.Fixed) { - settings.bodyType = RigidbodyType2D.Static; + rigidbody.bodyType = RigidbodyType2D.Static; } + go.AddComponent(); + if (rp.start) { cables.Add(new Cable { firstRoller = go }); } @@ -54,7 +59,7 @@ public class Controller : MonoBehaviour { } //create canvas to display information - var canvas = FindAnyObjectByType(); + var canvas = gameObject.AddComponent(); //prepare joints foreach (var go in gameObjects) { @@ -65,14 +70,23 @@ public class Controller : MonoBehaviour { dist.enableCollision = true; dist.connectedBody = rp.linkTo.GetComponent(); dist.maxDistanceOnly = true; - var (left, right) = CableJointsAlgorithm.TangentCircleCircle(go, rp.linkTo); - dist.anchor = left; - dist.connectedAnchor = right; - rp.currentDistance = dist.distance = dist.DistanceInWorld(left, right); + rp.distanceJoint2D = dist; + + //set fixed points only once + if (rp.useFixedAttachmentPoint) { + dist.anchor = rp.attachmentPoint; + } + if (rp.linkTo.GetComponent().useFixedAttachmentPoint) { + dist.connectedAnchor = rp.linkTo.GetComponent().attachmentPoint; + } + + //update roller tangent attachments + rp.updateDistanceJoints(); + + rp.currentDistance = dist.distance = dist.DistanceInWorld(dist.anchor, dist.connectedAnchor); } - if (rp.movement == RollerProperties.RotationType.Rotatable || - rp.movement == RollerProperties.RotationType.Powered) { + if (rp.movement is RollerProperties.RotationType.Rotatable or RollerProperties.RotationType.Powered) { var wheel = go.AddComponent(); wheel.anchor = Vector2.zero; if (rp.movement == RollerProperties.RotationType.Powered) { @@ -84,14 +98,16 @@ public class Controller : MonoBehaviour { //create names on objects GameObject text = new GameObject(go.name + "_text"); text.transform.parent = canvas.transform; - + var textMeshPro = text.AddComponent(); - textMeshPro.text = go.name + "\n" + (rp.clockwise ? "cw" : "ccw") + " - " + rp.movement; + // textMeshPro.material.shader.GetComponent().enabled = true; + // textMeshPro.material.shader.GetComponent().useGraphicAlpha = false; + // textMeshPro.material.shader.GetComponent().effectDistance = new Vector2(1, -1); textMeshPro.fontSize = .3f; - textMeshPro.color = Color.red; - textMeshPro.fontWeight = FontWeight.Bold; - textMeshPro.outlineColor = Color.white; - textMeshPro.outlineWidth = 1; + textMeshPro.color = Color.black; + textMeshPro.fontStyle = FontStyles.Bold; + textMeshPro.outlineColor = new Color(0.6f, 0.7f, 1f); + textMeshPro.outlineWidth = 0.1f; textMeshPro.horizontalAlignment = HorizontalAlignmentOptions.Center; textMeshPro.verticalAlignment = VerticalAlignmentOptions.Middle; textMeshPro.transform.localScale = new Vector3(100, 100, 1); @@ -101,7 +117,6 @@ public class Controller : MonoBehaviour { rp.text = text; } } - } diff --git a/Assets/RollerProperties.cs b/Assets/RollerProperties.cs index ce7cb36..8667e8e 100644 --- a/Assets/RollerProperties.cs +++ b/Assets/RollerProperties.cs @@ -9,22 +9,73 @@ using UnityEngine.Serialization; [System.Serializable] public class RollerProperties : MonoBehaviour { + //settings [SerializeField] public bool start = false; - [SerializeField] public bool clockwise = false; - [SerializeField] public GameObject linkTo = null; - [SerializeField] public RotationType movement = RotationType.Fixed; + [FormerlySerializedAs("fixedAttachmentPoint")] [SerializeField] public bool useFixedAttachmentPoint = false; + [SerializeField] public Vector2 attachmentPoint = new Vector2(0, 0); + //references + protected internal GameObject text; + protected internal DistanceJoint2D distanceJoint2D = null; + + //simulation properties protected internal float currentDistance; - protected internal GameObject text; + public (float?, float?) updateDistanceJoints() { + Vector2? left = null, right = null; + if (linkTo != null) { + if (useFixedAttachmentPoint && !linkTo.GetComponent().useFixedAttachmentPoint) { + //left = attachmentPoint; + right = CableJointsAlgorithm.TangentPointCircle(gameObject, linkTo); + } + else if (!useFixedAttachmentPoint && linkTo.GetComponent().useFixedAttachmentPoint) { + left = CableJointsAlgorithm.TangentPointCircle(linkTo,gameObject); + //right = linkTo.GetComponent().attachmentPoint; + } + else if (!useFixedAttachmentPoint && !linkTo.GetComponent().useFixedAttachmentPoint) { + (left, right) = CableJointsAlgorithm.TangentCircleCircle(gameObject, linkTo); + } + /* + else { + left = attachmentPoint; + right = linkTo.GetComponent().attachmentPoint; + }*/ + } + + + //TODO: assumes circles are flat for sufficiently small timesteps + float? leftSurfaceDist = null, rightSurfaceDist = null; + if (left.HasValue) { + leftSurfaceDist = (gameObject.transform.TransformPoint(distanceJoint2D.anchor) - gameObject.transform.TransformPoint(left.Value)) + .magnitude; + + distanceJoint2D.anchor = left.Value; + } + if (right.HasValue) { + rightSurfaceDist = (linkTo.transform.TransformPoint(distanceJoint2D.connectedAnchor) - + linkTo.transform.TransformPoint(right.Value)).magnitude; + + distanceJoint2D.connectedAnchor = right.Value; + } + + + return (leftSurfaceDist, rightSurfaceDist); + } + + /* VISUALS */ private void Update() { if (text != null) { text.transform.position = transform.position; - text.transform.rotation = transform.rotation; + //text.transform.rotation = transform.rotation; + text.GetComponent().text = gameObject.name + "\n" + + (clockwise ? "cw" : "ccw") + " - " + movement + "\n" + + "D: " + (distanceJoint2D == null + ? " - " + : distanceJoint2D.distance.ToString("0.00")) + "M: "+GetComponent().mass.ToString("0.00"); } } diff --git a/Assets/Scenes/SimpleDemo.unity b/Assets/Scenes/SimpleDemo.unity index d2634c8..a54e506 100644 --- a/Assets/Scenes/SimpleDemo.unity +++ b/Assets/Scenes/SimpleDemo.unity @@ -67,6 +67,9 @@ LightmapSettings: m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 @@ -120,7 +123,7 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &197689340 +--- !u!1 &870637784 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -128,99 +131,34 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 197689344} - - component: {fileID: 197689343} - - component: {fileID: 197689342} - - component: {fileID: 197689341} - m_Layer: 5 - m_Name: Canvas + - component: {fileID: 870637785} + m_Layer: 0 + m_Name: Objects m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &197689341 -MonoBehaviour: +--- !u!4 &870637785 +Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 197689340} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &197689342 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 197689340} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!223 &197689343 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 197689340} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_VertexColorAlwaysGammaSpace: 0 - m_AdditionalShaderChannelsFlag: 25 - m_UpdateRectTransformForStandalone: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &197689344 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 197689340} + m_GameObject: {fileID: 870637784} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0.2534463, y: -0.7609657, z: -0.06719851} + m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] + m_Children: + - {fileID: 1947610090} + - {fileID: 1073098768} + - {fileID: 1983224137} + - {fileID: 1588024398} + - {fileID: 1306628727} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} --- !u!1 &1073098765 GameObject: m_ObjectHideFlags: 0 @@ -251,10 +189,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 371c00a70d1ac344fae68d1834928173, type: 3} m_Name: m_EditorClassIdentifier: - start: 1 + start: 0 clockwise: 0 linkTo: {fileID: 1983224135} - movement: 1 + movement: 0 + useFixedAttachmentPoint: 0 + attachmentPoint: {x: 0, y: 0} --- !u!212 &1073098767 SpriteRenderer: m_ObjectHideFlags: 0 @@ -316,10 +256,140 @@ Transform: m_GameObject: {fileID: 1073098765} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -9.72, y: -2.61, z: 0} + m_LocalPosition: {x: -9.04, y: 1.4, z: 0.06719851} m_LocalScale: {x: 3, y: 3, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] + m_Father: {fileID: 870637785} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1142910635 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1142910638} + - component: {fileID: 1142910637} + - component: {fileID: 1142910636} + m_Layer: 0 + m_Name: Floor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!61 &1142910636 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1142910635} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1, y: 1} + newSize: {x: 1, y: 1} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 +--- !u!212 &1142910637 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1142910635} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!4 &1142910638 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1142910635} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.08, y: -7.78, z: 0} + m_LocalScale: {x: 30.073181, y: 1.5527159, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1200065142 @@ -427,6 +497,109 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d406720d26e7d1e4ba8afd140d67de7e, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &1306628726 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1306628727} + - component: {fileID: 1306628729} + - component: {fileID: 1306628728} + m_Layer: 0 + m_Name: Weight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1306628727 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1306628726} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 4.19, y: -1.65, z: 0.06719851} + m_LocalScale: {x: 2, y: 2, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 870637785} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1306628728 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1306628726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 371c00a70d1ac344fae68d1834928173, type: 3} + m_Name: + m_EditorClassIdentifier: + start: 0 + clockwise: 1 + linkTo: {fileID: 0} + movement: 3 + useFixedAttachmentPoint: 1 + attachmentPoint: {x: 0, y: 0.5} +--- !u!212 &1306628729 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1306628726} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 --- !u!1 &1588024395 GameObject: m_ObjectHideFlags: 0 @@ -459,8 +632,10 @@ MonoBehaviour: m_EditorClassIdentifier: start: 0 clockwise: 0 - linkTo: {fileID: 0} - movement: 2 + linkTo: {fileID: 1306628726} + movement: 1 + useFixedAttachmentPoint: 0 + attachmentPoint: {x: 0, y: 0} --- !u!212 &1588024397 SpriteRenderer: m_ObjectHideFlags: 0 @@ -522,12 +697,115 @@ Transform: m_GameObject: {fileID: 1588024395} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 4.53, y: 0.98, z: 0} + m_LocalPosition: {x: 4.276554, y: 1.7409657, z: 0.06719851} m_LocalScale: {x: 2, y: 2, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} + m_Father: {fileID: 870637785} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1947610089 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1947610090} + - component: {fileID: 1947610092} + - component: {fileID: 1947610091} + m_Layer: 0 + m_Name: Weight (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1947610090 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1947610089} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -10.71, y: -3.08, z: 0.06719851} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 870637785} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1947610091 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1947610089} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 371c00a70d1ac344fae68d1834928173, type: 3} + m_Name: + m_EditorClassIdentifier: + start: 1 + clockwise: 0 + linkTo: {fileID: 1073098765} + movement: 3 + useFixedAttachmentPoint: 1 + attachmentPoint: {x: 0, y: 0.5} +--- !u!212 &1947610092 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1947610089} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 --- !u!1 &1983224135 GameObject: m_ObjectHideFlags: 0 @@ -607,11 +885,11 @@ Transform: m_GameObject: {fileID: 1983224135} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.31, y: 0.38, z: 0} + m_LocalPosition: {x: -1.9, y: 4, z: 0.06719851} m_LocalScale: {x: 2, y: 2, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} + m_Father: {fileID: 870637785} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1983224138 MonoBehaviour: @@ -629,12 +907,12 @@ MonoBehaviour: clockwise: 0 linkTo: {fileID: 1588024395} movement: 1 + useFixedAttachmentPoint: 0 + attachmentPoint: {x: 0, y: 0} --- !u!1660057539 &9223372036854775807 SceneRoots: m_ObjectHideFlags: 0 m_Roots: - {fileID: 1200065145} - - {fileID: 197689344} - - {fileID: 1983224137} - - {fileID: 1588024398} - - {fileID: 1073098768} + - {fileID: 1142910638} + - {fileID: 870637785} diff --git a/Packages/manifest.json b/Packages/manifest.json index d1e6ce5..047e5e3 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -3,13 +3,12 @@ "com.csutil.cscore": "https://github.com/cs-util-com/cscore.git?path=CsCore/PlainNetClassLib/src/Plugins", "com.unity.collab-proxy": "2.2.0", "com.unity.feature.2d": "2.0.0", - "com.unity.ide.rider": "3.0.25", - "com.unity.ide.visualstudio": "2.0.21", + "com.unity.ide.rider": "3.0.26", "com.unity.test-framework": "1.3.9", "com.unity.textmeshpro": "3.0.6", "com.unity.timeline": "1.8.2", "com.unity.ugui": "1.0.0", - "com.unity.visualscripting": "1.8.0", + "com.unity.visualscripting": "1.9.1", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 7c50c00..18c0132 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -151,7 +151,7 @@ } }, "com.unity.ide.rider": { - "version": "3.0.25", + "version": "3.0.26", "depth": 0, "source": "registry", "dependencies": { @@ -159,15 +159,6 @@ }, "url": "https://packages.unity.com" }, - "com.unity.ide.visualstudio": { - "version": "2.0.21", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.test-framework": "1.1.9" - }, - "url": "https://packages.unity.com" - }, "com.unity.mathematics": { "version": "1.2.6", "depth": 2, @@ -224,7 +215,7 @@ } }, "com.unity.visualscripting": { - "version": "1.8.0", + "version": "1.9.1", "depth": 0, "source": "registry", "dependencies": {