浏览代码

clean up collab push

/develop/pushcollabonly
HH 4 年前
当前提交
453161fc
共有 13 个文件被更改,包括 1608 次插入1611 次删除
  1. 2
      Project/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlockCollab.unity
  2. 20
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentCollab.cs
  3. 33
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockEnvController.cs
  4. 540
      Project/Assets/ML-Agents/Examples/Sorter/Prefabs/Area.prefab
  5. 2
      com.unity.ml-agents.extensions/Runtime/Sensors/CountingGridSensor.cs
  6. 158
      com.unity.ml-agents.extensions/Runtime/Sensors/GridSensor.cs
  7. 1001
      Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockCollabAreaGrid.prefab
  8. 455
      Project/Assets/ML-Agents/Examples/Sorter/Prefabs/NumberBlock (1).prefab
  9. 7
      Project/Assets/ML-Agents/Examples/Sorter/Prefabs/NumberBlock (1).prefab.meta
  10. 1001
      Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockCollabAreaStaticGrid.prefab
  11. 0
      /Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockCollabAreaRays.prefab
  12. 0
      /Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockCollabAreaRays.prefab.meta
  13. 0
      /Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockCollabAreaGrid.prefab.meta

2
Project/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlockCollab.unity


- target: {fileID: 8191903532335653025, guid: f5bbed44a6ea747a687fbbb738eb1730,
type: 3}
propertyPath: m_Name
value: PushBlockCollabAreaStaticGrid
value: PushBlockCollabAreaGrid
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f5bbed44a6ea747a687fbbb738eb1730, type: 3}

20
Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentCollab.cs


using UnityEngine;
using Unity.MLAgents;
using Unity.MLAgents.Actuators;
using Unity.MLAgents.Sensors;
PushBlockSettings m_PushBlockSettings;
// Rigidbody m_BlockRb; //cached on initialization
Rigidbody m_AgentRb; //cached on initialization
private PushBlockSettings m_PushBlockSettings;
private Rigidbody m_AgentRb; //cached on initialization
public bool useVectorObs = true;
void Awake()
{
m_PushBlockSettings = FindObjectOfType<PushBlockSettings>();

{
// Cache the agent rigidbody
// Cache the agent rb
m_AgentRb = GetComponent<Rigidbody>();
}

ForceMode.VelocityChange);
}
/// <summary>
/// Called every step of the engine. Here the agent takes an action.
/// </summary>

discreteActionsOut[0] = 2;
}
}
/// <summary>
/// In the editor, if "Reset On Done" is checked then AgentReset() will be
/// called automatically anytime we mark done = true in an agent script.
/// </summary>
public override void OnEpisodeBegin()
{
}
}

33
Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockEnvController.cs


public class PushBlockEnvController : MonoBehaviour
{
[System.Serializable]
public class AgentInfo
public class PlayerInfo
{
public PushAgentCollab Agent;
[HideInInspector]

[HideInInspector]
public Rigidbody Rb;
}
[System.Serializable]

/// </summary>
/// <returns></returns>
[Header("Max Environment Steps")] public int MaxEnvironmentSteps = 25000;
// private int m_ResetTimer;
/// <summary>
/// The area bounds.

/// </summary>
Renderer m_GroundRenderer;
public List<AgentInfo> AgentsList = new List<AgentInfo>();
//List of Agents On Platform
public List<PlayerInfo> AgentsList = new List<PlayerInfo>();
//List of Blocks On Platform
public List<BlockInfo> BlocksList = new List<BlockInfo>();
public bool UseRandomAgentRotation = true;

PushBlockSettings m_PushBlockSettings;
private PushBlockSettings m_PushBlockSettings;
private int m_NumberOfRemainingBlocks;

// Starting material
m_GroundMaterial = m_GroundRenderer.material;
m_PushBlockSettings = FindObjectOfType<PushBlockSettings>();
// Initialize Blocks
foreach (var item in BlocksList)
{
item.StartingPos = item.T.transform.position;

item.Rb = item.Agent.GetComponent<Rigidbody>();
m_AgentGroup.RegisterAgent(item.Agent);
}
}
void FixedUpdate()

m_AgentGroup.GroupEpisodeInterrupted();
ResetScene();
}
// foreach (var item in BlocksList)
// {
// //Give Agent Rewards
// m_AgentGroup.AddGroupReward(.01f * item.Rb.velocity.sqrMagnitude);
// }
}
/// <summary>

block.Rb.angularVelocity = Vector3.zero;
}
/// <summary>
/// Swap ground material, wait time seconds, then swap back to the regular material.
/// </summary>

// Swap ground material for a bit to indicate we scored.
StartCoroutine(GoalScoredSwapGroundMaterial(m_PushBlockSettings.goalScoredMaterial, 0.5f));
print($"Scored {score} on gameObject.name");
if (done)
{
//Reset assets

{
m_ResetTimer = 0;
//Random platform rot
//Random platform rotation
//End Episode
// foreach (var item in AgentsList)
// {
// if (!item.Agent)
// {
// return;
// }
// item.Agent.EndEpisode();
// }
//Reset Agents
foreach (var item in AgentsList)
{

//Reset counter
m_NumberOfRemainingBlocks = BlocksList.Count;
// m_NumberOfRemainingBlocks = 2;
}
}

540
Project/Assets/ML-Agents/Examples/Sorter/Prefabs/Area.prefab


serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &1824113897006727150
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2261773915132031723}
- component: {fileID: 7499248043294897087}
- component: {fileID: 5998511511330351574}
m_Layer: 0
m_Name: Inside
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2261773915132031723
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1824113897006727150}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 20.5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 5598891170337492841}
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: 0, y: 144.31}
m_SizeDelta: {x: 150, y: 300}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7499248043294897087
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1824113897006727150}
m_CullTransparentMesh: 0
--- !u!114 &5998511511330351574
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1824113897006727150}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 300
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 1
--- !u!1 &1881191515313858674
GameObject:
m_ObjectHideFlags: 0

m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!1 &2340844810067769167
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8933798646782069016}
- component: {fileID: 8520526422007001508}
- component: {fileID: 4108390336559883855}
- component: {fileID: 8115097439355240966}
m_Layer: 0
m_Name: Cube
m_TagString: tile
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8933798646782069016
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2340844810067769167}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 20.5}
m_LocalScale: {x: 3.5, y: 4.2825084, z: 1.5204146}
m_Children: []
m_Father: {fileID: 4024092909604387738}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &8520526422007001508
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2340844810067769167}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &4108390336559883855
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2340844810067769167}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: eaad04b0e0dec42229c9cb00a981d7ac, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &8115097439355240966
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2340844810067769167}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &2350221165175225226
GameObject:
m_ObjectHideFlags: 0

m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 2
--- !u!1 &3609923099988340372
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7774049992652504376}
- component: {fileID: 7809923890313348080}
- component: {fileID: 4080862595928694585}
m_Layer: 0
m_Name: Top
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7774049992652504376
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3609923099988340372}
m_LocalRotation: {x: 0.0000006521721, y: -0.70710677, z: -0.7071069, w: -0.0000006556511}
m_LocalPosition: {x: 0, y: 0, z: 98}
m_LocalScale: {x: -1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 5598891170337492841}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: -89.99999, y: -180, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -7.6, y: 355.9}
m_SizeDelta: {x: 150, y: 300}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7809923890313348080
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3609923099988340372}
m_CullTransparentMesh: 0
--- !u!114 &4080862595928694585
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3609923099988340372}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 150
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 1
--- !u!1 &3798200277952854330
GameObject:
m_ObjectHideFlags: 0

m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 8
--- !u!1 &6409400146753174675
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4496453681798804367}
- component: {fileID: 3078928802222589710}
- component: {fileID: 4843658886990143739}
m_Layer: 0
m_Name: Outside
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4496453681798804367
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6409400146753174675}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 174.1}
m_LocalScale: {x: -1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 5598891170337492841}
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}
m_AnchoredPosition: {x: 0, y: 144.31}
m_SizeDelta: {x: 150, y: 300}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3078928802222589710
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6409400146753174675}
m_CullTransparentMesh: 0
--- !u!114 &4843658886990143739
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6409400146753174675}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 300
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 1
--- !u!1 &6468885985133825205
GameObject:
m_ObjectHideFlags: 0

m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 16
--- !u!1 &7417631105719906463
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5598891170337492841}
- component: {fileID: 1394876050867164380}
- component: {fileID: 7658704470142322628}
m_Layer: 0
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5598891170337492841
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7417631105719906463}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 19.52}
m_LocalScale: {x: 0.01, y: 0.01, z: 0.01}
m_Children:
- {fileID: 2261773915132031723}
- {fileID: 4496453681798804367}
- {fileID: 7774049992652504376}
m_Father: {fileID: 4024092909604387738}
m_RootOrder: 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: -1.4103451}
m_SizeDelta: {x: 2.5, y: 5}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!223 &1394876050867164380
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7417631105719906463}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &7658704470142322628
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7417631105719906463}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, 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
--- !u!1 &7548009965402332557
GameObject:
m_ObjectHideFlags: 0

m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 6
--- !u!1 &8967865955267062370
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4024092909604387738}
- component: {fileID: 1917831257363183701}
m_Layer: 0
m_Name: NumberBlock (1)
m_TagString: tile
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &4024092909604387738
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8967865955267062370}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 1.84, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 5598891170337492841}
- {fileID: 8933798646782069016}
m_Father: {fileID: 6435615669307084425}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1917831257363183701
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8967865955267062370}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 03b2e6d9493cc4a92acf7f3b8b438aa4, type: 3}
m_Name:
m_EditorClassIdentifier:
NumberValue: 1
DefaultMaterial: {fileID: 2100000, guid: eaad04b0e0dec42229c9cb00a981d7ac, type: 2}
SuccessMaterial: {fileID: 2100000, guid: c67450f290f3e4897bc40276a619e78d, type: 2}
--- !u!1 &8974693141721766854
GameObject:
m_ObjectHideFlags: 0

m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 19
--- !u!1001 &2217275922997514583
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 6435615669307084425}
m_Modifications:
- target: {fileID: 2962572070495988429, guid: 54fa18734adf14d5ba1c4051d4e449db,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2962572070495988429, guid: 54fa18734adf14d5ba1c4051d4e449db,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.84
objectReference: {fileID: 0}
- target: {fileID: 2962572070495988429, guid: 54fa18734adf14d5ba1c4051d4e449db,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2962572070495988429, guid: 54fa18734adf14d5ba1c4051d4e449db,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2962572070495988429, guid: 54fa18734adf14d5ba1c4051d4e449db,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2962572070495988429, guid: 54fa18734adf14d5ba1c4051d4e449db,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2962572070495988429, guid: 54fa18734adf14d5ba1c4051d4e449db,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2962572070495988429, guid: 54fa18734adf14d5ba1c4051d4e449db,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2962572070495988429, guid: 54fa18734adf14d5ba1c4051d4e449db,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2962572070495988429, guid: 54fa18734adf14d5ba1c4051d4e449db,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2962572070495988429, guid: 54fa18734adf14d5ba1c4051d4e449db,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7111494040835078965, guid: 54fa18734adf14d5ba1c4051d4e449db,
type: 3}
propertyPath: m_Name
value: NumberBlock (1)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 54fa18734adf14d5ba1c4051d4e449db, type: 3}
--- !u!114 &1917831257363183701 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 313239774709082370, guid: 54fa18734adf14d5ba1c4051d4e449db,
type: 3}
m_PrefabInstance: {fileID: 2217275922997514583}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 03b2e6d9493cc4a92acf7f3b8b438aa4, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &4024092909604387738 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2962572070495988429, guid: 54fa18734adf14d5ba1c4051d4e449db,
type: 3}
m_PrefabInstance: {fileID: 2217275922997514583}
m_PrefabAsset: {fileID: 0}

2
com.unity.ml-agents.extensions/Runtime/Sensors/CountingGridSensor.cs


this.CellScaleZ = cellScaleZ;
this.GridNumSideX = gridWidth;
this.GridNumSideZ = gridHeight;
this.RotateGridWithRoot = rotateToAgent;
this.RotateToAgent = rotateToAgent;
this.DiffNumSideZX = (GridNumSideZ - GridNumSideX);
this.OffsetGridNumSide = (GridNumSideZ - 1f) / 2f;
this.DebugColors = debugColors;

158
com.unity.ml-agents.extensions/Runtime/Sensors/GridSensor.cs


public float CellScaleX = 1f;
/// <summary>
/// The height of each grid cell. Changes how much of the vertical axis is observed by a cell.
/// </summary>
[Tooltip("The height of each grid cell. Changes how much of the vertical axis is observed by a cell")]
[Range(0.01f, 1000f)]
public float CellScaleY = 0.01f;
/// <summary>
/// The depth of each grid cell.
/// </summary>
[Tooltip("The depth of each grid cell")]

[Range(2, 2000)]
public int GridNumSideZ = 16;
/// <summary>
/// The height of each grid cell. Changes how much of the vertical axis is observed by a cell.
/// </summary>
[Tooltip("The height of each grid cell. Changes how much of the vertical axis is observed by a cell")]
[Range(0.01f, 1000f)]
public float CellScaleY = 0.01f;
public bool RotateGridWithRoot;
public bool RotateToAgent;
/// <summary>
/// Array holding the depth of each channel.

/// </summary>
private List<byte[]> byteSizesBytesList;
private Color DebugDefaultColor = new Color(1f, 1f, 1f, 0.05f);
private Color DebugDefaultColor = new Color(1f, 1f, 1f, 0.25f);
// public GridSensor GridSensorToObserve;
// return GridSensorToObserve;
return this;
}

this.CellScaleZ = cellScaleZ;
this.GridNumSideX = gridWidth;
this.GridNumSideZ = gridHeight;
this.RotateGridWithRoot = rotateToAgent;
this.RotateToAgent = rotateToAgent;
this.DiffNumSideZX = (GridNumSideZ - GridNumSideX);
this.OffsetGridNumSide = (GridNumSideZ - 1f) / 2f;
this.DebugColors = debugColors;

ClearPerceptionBuffer();
using (TimerStack.Instance.Scoped("GridSensor.Perceive"))
{
// var halfCellScale = new Vector3(CellScaleX / 2f, CellScaleY, CellScaleZ / 2f);
var halfCellScale = new Vector3(CellScaleX / 2f, CellScaleY / 2, CellScaleZ / 2f);
// Vector3 halfCellScale = Vector3.one * (overlapBoxScale * .5f);
var halfCellScale = new Vector3(CellScaleX / 2f, CellScaleY, CellScaleZ / 2f);
if (RotateGridWithRoot)
if (RotateToAgent)
// Transform transform1;
// cellCenter = (transform1 = transform).TransformPoint(CellPoints[cellIndex]);
// numFound = BufferResizingOverlapBoxNonAlloc(cellCenter, halfCellScale, transform1.rotation);
cellCenter = rootReference.transform.TransformPoint(CellPoints[cellIndex]);
numFound = BufferResizingOverlapBoxNonAlloc(cellCenter, halfCellScale, rootReference.transform.rotation);
Transform transform1;
cellCenter = (transform1 = transform).TransformPoint(CellPoints[cellIndex]);
numFound = BufferResizingOverlapBoxNonAlloc(cellCenter, halfCellScale, transform1.rotation);
// numFound = BufferResizingOverlapBoxNonAlloc(cellCenter, halfCellScale, Quaternion.identity);
numFound = BufferResizingOverlapBoxNonAlloc(cellCenter, halfCellScale, rootReference.transform.rotation);
numFound = BufferResizingOverlapBoxNonAlloc(cellCenter, halfCellScale, Quaternion.identity);
}
if (numFound > 0)

{
var currentColliderGo = foundColliders[i].gameObject;
// // Continue if the current collider go is the root reference
// if (ReferenceEquals(currentColliderGo, rootReference))
// continue;
if (collidersToIgnore.Contains(foundColliders[i]))
// if (currentColliderGo == rootReference && !MapThisAgent)
// if (!MapThisAgent)
// Continue if the current collider go is the root reference
if (ReferenceEquals(currentColliderGo, rootReference))
continue;
var closestColliderPoint = foundColliders[i].ClosestPointOnBounds(cellCenter);

float z = (cell / GridNumSideZ - OffsetGridNumSide) * CellScaleZ - DiffNumSideZX;
if (shouldTransformPoint)
return rootReference.transform.TransformPoint(new Vector3(x, 0, z));
// return transform.TransformPoint(new Vector3(x, 0, z));
return transform.TransformPoint(new Vector3(x, 0, z));
// /// <summary>Finds the cell in which the given global point falls</summary>
// /// <returns>
// /// The index of the cell in which the global point falls or -1 if the point does not fall into a cell
// /// </returns>
// /// <param name="globalPoint">The 3D point in global space</param>
// public int PointToCell(Vector3 globalPoint)
// {
// // Vector3 point = transform.InverseTransformPoint(globalPoint);
// Vector3 point = rootReference.transform.InverseTransformPoint(globalPoint);
//
// if (point.x < -HalfOfGridX || point.x > HalfOfGridX || point.z < -HalfOfGridZ || point.z > HalfOfGridZ)
// return -1;
//
// float x = point.x + HalfOfGridX;
// float z = point.z + HalfOfGridZ;
//
// int _x = (int)Mathf.Floor(x * PointToCellScalingX);
// int _z = (int)Mathf.Floor(z * PointToCellScalingZ);
// return GridNumSideX * _z + _x;
// }
/// <summary>Finds the cell in which the given global point falls</summary>
/// <returns>
/// The index of the cell in which the global point falls or -1 if the point does not fall into a cell
/// </returns>
/// <param name="globalPoint">The 3D point in global space</param>
public int PointToCell(Vector3 globalPoint)
{
Vector3 point = transform.InverseTransformPoint(globalPoint);
if (point.x < -HalfOfGridX || point.x > HalfOfGridX || point.z < -HalfOfGridZ || point.z > HalfOfGridZ)
return -1;
float x = point.x + HalfOfGridX;
float z = point.z + HalfOfGridZ;
int _x = (int)Mathf.Floor(x * PointToCellScalingX);
int _z = (int)Mathf.Floor(z * PointToCellScalingZ);
return GridNumSideX * _z + _x;
}
/// <summary>Copies the data from one cell to another</summary>
/// <param name="fromCellID">index of the cell to copy from</param>

CellActivity[toCellID] = CellActivity[fromCellID];
}
// void OnDrawGizmos()
// {
// if (ShowGizmos)
// {
// if (Application.isEditor && !Application.isPlaying)
// Start();
//
// Perceive();
//
// var scale = new Vector3(CellScaleX, 1, CellScaleZ);
// var offset = new Vector3(0, GizmoYOffset, 0);
// var oldGizmoMatrix = Gizmos.matrix;
// for (var i = 0; i < NumCells; i++)
// {
// Matrix4x4 cubeTransform;
// if (RotateToAgent)
// {
// cubeTransform = Matrix4x4.TRS(CellToPoint(i) + offset, transform.rotation, scale);
// }
// else
// {
// cubeTransform = Matrix4x4.TRS(CellToPoint(i, false) + transform.position + offset, Quaternion.identity, scale);
// }
// Gizmos.matrix = oldGizmoMatrix * cubeTransform;
// Gizmos.color = CellActivity[i];
// Gizmos.DrawCube(Vector3.zero, Vector3.one);
// }
//
// Gizmos.matrix = oldGizmoMatrix;
//
// if (Application.isEditor && !Application.isPlaying)
// DestroyImmediate(m_perceptionTexture2D);
// }
// }
public List<Collider> collidersToIgnore; //
// public float overlapBoxScale = .5f;
void OnDrawGizmos()
{
if (ShowGizmos)

Perceive();
// Vector3 scale = new Vector3(CellScaleX, 1, CellScaleZ);
Vector3 scale = new Vector3(CellScaleX, CellScaleY, CellScaleZ);
Vector3 offset = new Vector3(0, GizmoYOffset, 0);
Matrix4x4 oldGizmoMatrix = Gizmos.matrix;
Matrix4x4 cubeTransform = Gizmos.matrix;
// Matrix4x4 cubeTransform = rootReference.transform.localToWorldMatrix;
// Matrix4x4 cubeTransform = transform.localToWorldMatrix;
for (int i = 0; i < NumCells; i++)
var scale = new Vector3(CellScaleX, 1, CellScaleZ);
var offset = new Vector3(0, GizmoYOffset, 0);
var oldGizmoMatrix = Gizmos.matrix;
for (var i = 0; i < NumCells; i++)
if (RotateGridWithRoot)
Matrix4x4 cubeTransform;
if (RotateToAgent)
// cubeTransform = Matrix4x4.TRS(CellToPoint(i) + offset, transform.rotation, scale);
cubeTransform = Matrix4x4.TRS(CellToPoint(i) + offset, rootReference.transform.rotation, scale);
cubeTransform = Matrix4x4.TRS(CellToPoint(i) + offset, transform.rotation, scale);
// cubeTransform = Matrix4x4.TRS(CellToPoint(i, false) + transform.position + offset, Quaternion.identity, scale);
cubeTransform = Matrix4x4.TRS(CellToPoint(i, false) + rootReference.transform.position + offset, Quaternion.identity, scale);
// cubeTransform = Matrix4x4.TRS(CellToPoint(i, false) + offset, Quaternion.identity, scale);
cubeTransform = Matrix4x4.TRS(CellToPoint(i, false) + transform.position + offset, Quaternion.identity, scale);
// Gizmos.DrawCube(Vector3.zero, Vector3.one * .75f);
// Gizmos.DrawCube(Vector3.zero, Vector3.one * overlapBoxScale);
Gizmos.DrawCube(Vector3.zero, scale);
// Gizmos.DrawCube(Vector3.zero, new Vector3(.85f, .15f, .85f));
// Gizmos.DrawWireCube(Vector3.zero, Vector3.one * .75f);
// Gizmos.DrawSphere(Vector3.zero, .5f);
Gizmos.DrawCube(Vector3.zero, Vector3.one);
}
Gizmos.matrix = oldGizmoMatrix;

}
}
/// <inheritdoc/>
void ISensor.Update()

1001
Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockCollabAreaGrid.prefab
文件差异内容过多而无法显示
查看文件

455
Project/Assets/ML-Agents/Examples/Sorter/Prefabs/NumberBlock (1).prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &546577507818368697
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 118843807654175676}
- component: {fileID: 8563584695318192872}
- component: {fileID: 5619268322607822977}
m_Layer: 0
m_Name: Inside
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &118843807654175676
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 546577507818368697}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 20.5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6014022315845787198}
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: 0, y: 144.31}
m_SizeDelta: {x: 150, y: 300}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8563584695318192872
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 546577507818368697}
m_CullTransparentMesh: 0
--- !u!114 &5619268322607822977
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 546577507818368697}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 300
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 1
--- !u!1 &3232561276458844099
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8441894095225695343}
- component: {fileID: 8261630118179230375}
- component: {fileID: 2767315034027134574}
m_Layer: 0
m_Name: Top
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8441894095225695343
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3232561276458844099}
m_LocalRotation: {x: 0.0000006521721, y: -0.70710677, z: -0.7071069, w: -0.0000006556511}
m_LocalPosition: {x: 0, y: 0, z: 98}
m_LocalScale: {x: -1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6014022315845787198}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: -89.99999, y: -180, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -7.6, y: 355.9}
m_SizeDelta: {x: 150, y: 300}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8261630118179230375
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3232561276458844099}
m_CullTransparentMesh: 0
--- !u!114 &2767315034027134574
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3232561276458844099}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 150
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 1
--- !u!1 &4519645108134274584
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7295376462583208015}
- component: {fileID: 7564821518715560179}
- component: {fileID: 2866180017241962264}
- component: {fileID: 7952167907372864337}
m_Layer: 0
m_Name: Cube
m_TagString: tile
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7295376462583208015
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4519645108134274584}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 20.5}
m_LocalScale: {x: 3.5, y: 4.2825084, z: 1.5204146}
m_Children: []
m_Father: {fileID: 2962572070495988429}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &7564821518715560179
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4519645108134274584}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &2866180017241962264
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4519645108134274584}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: eaad04b0e0dec42229c9cb00a981d7ac, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &7952167907372864337
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4519645108134274584}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &5059684014731046340
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2351939452975604440}
- component: {fileID: 3782977346550191705}
- component: {fileID: 6772704293846593964}
m_Layer: 0
m_Name: Outside
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2351939452975604440
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5059684014731046340}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 174.1}
m_LocalScale: {x: -1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6014022315845787198}
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}
m_AnchoredPosition: {x: 0, y: 144.31}
m_SizeDelta: {x: 150, y: 300}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3782977346550191705
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5059684014731046340}
m_CullTransparentMesh: 0
--- !u!114 &6772704293846593964
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5059684014731046340}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 300
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 1
--- !u!1 &7111494040835078965
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2962572070495988429}
- component: {fileID: 313239774709082370}
m_Layer: 0
m_Name: NumberBlock (1)
m_TagString: tile
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &2962572070495988429
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7111494040835078965}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 1.84, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 6014022315845787198}
- {fileID: 7295376462583208015}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &313239774709082370
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7111494040835078965}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 03b2e6d9493cc4a92acf7f3b8b438aa4, type: 3}
m_Name:
m_EditorClassIdentifier:
NumberValue: 1
DefaultMaterial: {fileID: 2100000, guid: eaad04b0e0dec42229c9cb00a981d7ac, type: 2}
SuccessMaterial: {fileID: 2100000, guid: c67450f290f3e4897bc40276a619e78d, type: 2}
--- !u!1 &8662076319952642504
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6014022315845787198}
- component: {fileID: 981433789654238603}
- component: {fileID: 8398218895995737747}
m_Layer: 0
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6014022315845787198
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8662076319952642504}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 19.52}
m_LocalScale: {x: 0.01, y: 0.01, z: 0.01}
m_Children:
- {fileID: 118843807654175676}
- {fileID: 2351939452975604440}
- {fileID: 8441894095225695343}
m_Father: {fileID: 2962572070495988429}
m_RootOrder: 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: -1.4103451}
m_SizeDelta: {x: 2.5, y: 5}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!223 &981433789654238603
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8662076319952642504}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &8398218895995737747
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8662076319952642504}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, 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

7
Project/Assets/ML-Agents/Examples/Sorter/Prefabs/NumberBlock (1).prefab.meta


fileFormatVersion: 2
guid: 54fa18734adf14d5ba1c4051d4e449db
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockCollabAreaStaticGrid.prefab
文件差异内容过多而无法显示
查看文件

/Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockCollabArea.prefab → /Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockCollabAreaRays.prefab

/Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockCollabArea.prefab.meta → /Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockCollabAreaRays.prefab.meta

/Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockCollabAreaStaticGrid.prefab.meta → /Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockCollabAreaGrid.prefab.meta

正在加载...
取消
保存