This commit is contained in:
PC-20230316NUNE\Administrator
2024-02-01 19:06:51 +08:00
parent aa4d6c3ce2
commit 877dca3b43
7518 changed files with 653768 additions and 162059 deletions

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 738dba074827144f3a75e6749e8969aa

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: a466d8d94f39e48f39b1afecb4985632

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f11eb89769bbe49fcbe669008644cf71

View File

@@ -0,0 +1,65 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 3
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Arrow
m_Shader: {fileID: 203, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: []
m_CustomRenderQueue: -1
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 2800000, guid: 5de2706722ecf4e7797812f980546c1a, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DecalTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Cutoff
second: .5
data:
first:
name: _InvFade
second: 1
data:
first:
name: _Shininess
second: .0876900703
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
data:
first:
name: _SpecColor
second: {r: .870802224, g: .870802224, b: .870802224, a: 0}
data:
first:
name: _TintColor
second: {r: 1, g: 1, b: 1, a: .494117647}
--- !u!1002 &2100001
EditorExtensionImpl:
serializedVersion: 6

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 6ac95c099f0e2ad4d90aa8dbf92a6f5d

View File

@@ -0,0 +1,45 @@
fileFormatVersion: 2
guid: 5de2706722ecf4e7797812f980546c1a
TextureImporter:
serializedVersion: 2
mipmaps:
mipMapMode: 1
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: 2
aniso: 9
mipBias: -1
wrapMode: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 5
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

View File

@@ -0,0 +1,139 @@
using UnityEngine;
using System.Collections.Generic;
using Game.Plugins.App.Sync;
using Pathfinding.RVO;
using Pathfinding.RVO.Sampled;
namespace Pathfinding.Examples {
/// <summary>
/// RVO Example Scene Unit Controller.
/// Controls AIs and camera in the RVO example scene.
/// </summary>
[HelpURL("https://arongranberg.com/astar/documentation/stable/class_pathfinding_1_1_examples_1_1_group_controller.php")]
public class GroupController : JNGSyncFrameDefault {
public GUIStyle selectionBox;
public bool adjustCamera = true;
Vector2 start, end;
bool wasDown = false;
List<RVOExampleAgent> selection = new List<RVOExampleAgent>();
Simulator sim;
Camera cam;
public void Start () {
cam = Camera.main;
var simu = RVOSimulator.active;
if (simu == null) {
this.enabled = false;
throw new System.Exception("No RVOSimulator in the scene. Please add one");
}
sim = simu.GetSimulator();
}
public override void OnSyncUpdate(int dt, JNFrameInfo frame, Object input)
{
base.OnSyncUpdate(dt, frame, input);
if (adjustCamera) {
//Adjust camera
List<Agent> agents = sim.GetAgents();
float max = 0;
for (int i = 0; i < agents.Count; i++) {
float d = Mathf.Max(Mathf.Abs(agents[i].Position.x), Mathf.Abs(agents[i].Position.y));
if (d > max) {
max = d;
}
}
float hh = max / Mathf.Tan((cam.fieldOfView*Mathf.Deg2Rad/2.0f));
float hv = max / Mathf.Tan(Mathf.Atan(Mathf.Tan(cam.fieldOfView*Mathf.Deg2Rad/2.0f)*cam.aspect));
var yCoord = Mathf.Max(hh, hv)*1.1f;
yCoord = Mathf.Max(yCoord, 20);
yCoord = Mathf.Min(yCoord, cam.farClipPlane - 1f);
cam.transform.position = Vector3.Lerp(cam.transform.position, new Vector3(0, yCoord, 0), GetSync().Time.smoothDeltaTime*2);
}
if (Input.GetKey(KeyCode.A) && Input.GetKeyDown(KeyCode.Mouse0)) {
Order();
}
}
// Update is called once per frame
void OnGUI () {
if (Event.current.type == EventType.MouseUp && Event.current.button == 0 && !Input.GetKey(KeyCode.A)) {
Select(start, end);
wasDown = false;
}
if (Event.current.type == EventType.MouseDrag && Event.current.button == 0) {
end = Event.current.mousePosition;
if (!wasDown) { start = end; wasDown = true; }
}
if (Input.GetKey(KeyCode.A)) wasDown = false;
if (wasDown) {
Rect r = Rect.MinMaxRect(Mathf.Min(start.x, end.x), Mathf.Min(start.y, end.y), Mathf.Max(start.x, end.x), Mathf.Max(start.y, end.y));
if (r.width > 4 && r.height > 4)
GUI.Box(r, "", selectionBox);
}
}
public void Order () {
Ray ray = cam.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
if (Physics.Raycast(ray, out hit)) {
float radsum = 0;
for (int i = 0; i < selection.Count; i++) radsum += selection[i].GetComponent<RVOController>().radius;
float radius = radsum / (Mathf.PI);
radius *= 2f;
for (int i = 0; i < selection.Count; i++) {
float deg = 2*Mathf.PI*i/selection.Count;
Vector3 p = hit.point + new Vector3(Mathf.Cos(deg), 0, Mathf.Sin(deg))*radius;
//Debug.DrawRay (p,Vector3.up*4,Color.cyan);
//Debug.Break();
selection[i].SetTarget(p);
selection[i].SetColor(GetColor(deg));
selection[i].RecalculatePath();
}
}
}
public void Select (Vector2 _start, Vector2 _end) {
_start.y = Screen.height - _start.y;
_end.y = Screen.height - _end.y;
Vector2 start = Vector2.Min(_start, _end);
Vector2 end = Vector2.Max(_start, _end);
if ((end-start).sqrMagnitude < 4*4) return;
selection.Clear();
RVOExampleAgent[] rvo = FindObjectsOfType(typeof(RVOExampleAgent)) as RVOExampleAgent[];
for (int i = 0; i < rvo.Length; i++) {
Vector2 sp = cam.WorldToScreenPoint(rvo[i].transform.position);
if (sp.x > start.x && sp.y > start.y && sp.x < end.x && sp.y < end.y) {
selection.Add(rvo[i]);
}
}
}
/// <summary>Radians to degrees constant</summary>
const float rad2Deg = 360.0f/ ((float)System.Math.PI*2);
/// <summary>Color from an angle</summary>
public Color GetColor (float angle) {
return AstarMath.HSVToRGB(angle * rad2Deg, 0.8f, 0.6f);
}
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: db9dd0f9051524c2c87924ce0b79f2a6
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}

View File

@@ -0,0 +1,319 @@
using UnityEngine;
using System.Collections.Generic;
using Pathfinding.RVO;
namespace Pathfinding.Examples {
[RequireComponent(typeof(MeshFilter))]
/// <summary>
/// Lightweight RVO Circle Example.
/// Lightweight script for simulating agents in a circle trying to reach their antipodal positions.
/// This script, compared to using lots of RVOAgents shows the real power of the RVO simulator when
/// little other overhead (e.g GameObjects) is present.
///
/// For example with this script, I can simulate 5000 agents at around 50 fps on my laptop (with desired simulation fps = 10 and interpolation, 2 threads)
/// however when using prefabs, only instantiating the 5000 agents takes 10 seconds and it runs at around 5 fps.
///
/// This script will render the agents by generating a square for each agent combined into a single mesh with appropriate UV.
///
/// A few GUI buttons will be drawn by this script with which the user can change the number of agents.
/// [Open online documentation to see images]
/// </summary>
[HelpURL("https://arongranberg.com/astar/documentation/stable/class_pathfinding_1_1_examples_1_1_lightweight_r_v_o.php")]
public class LightweightRVO : MonoBehaviour {
/// <summary>Number of agents created at start</summary>
public int agentCount = 100;
/// <summary>
/// How large is the area where agents are placed.
/// For e.g the circle example, it corresponds
/// </summary>
public float exampleScale = 100;
public enum RVOExampleType {
Circle,
Line,
Point,
RandomStreams,
Crossing
}
public RVOExampleType type = RVOExampleType.Circle;
/// <summary>Agent radius</summary>
public float radius = 3;
/// <summary>Max speed for an agent</summary>
public float maxSpeed = 2;
/// <summary>How far in the future too look for agents</summary>
public float agentTimeHorizon = 10;
[HideInInspector]
/// <summary>How far in the future too look for obstacles</summary>
public float obstacleTimeHorizon = 10;
/// <summary>Max number of neighbour agents to take into account</summary>
public int maxNeighbours = 10;
/// <summary>
/// Offset from the agent position the actual drawn postition.
/// Used to get rid of z-buffer issues
/// </summary>
public Vector3 renderingOffset = Vector3.up*0.1f;
/// <summary>Enable the debug flag for all agents</summary>
public bool debug = false;
/// <summary>Mesh for rendering</summary>
Mesh mesh;
/// <summary>Reference to the simulator in the scene</summary>
Pathfinding.RVO.Simulator sim;
/// <summary>All agents handled by this script</summary>
List<IAgent> agents;
/// <summary>Goals for each agent</summary>
List<Vector3> goals;
/// <summary>Color for each agent</summary>
List<Color> colors;
Vector3[] verts;
Vector2[] uv;
int[] tris;
Color[] meshColors;
Vector2[] interpolatedVelocities;
Vector2[] interpolatedRotations;
public void Start () {
mesh = new Mesh();
RVOSimulator rvoSim = FindObjectOfType(typeof(RVOSimulator)) as RVOSimulator;
if (rvoSim == null) {
Debug.LogError("No RVOSimulator could be found in the scene. Please add a RVOSimulator component to any GameObject");
return;
}
sim = rvoSim.GetSimulator();
GetComponent<MeshFilter>().mesh = mesh;
CreateAgents(agentCount);
}
public void OnGUI () {
if (GUILayout.Button("2")) CreateAgents(2);
if (GUILayout.Button("10")) CreateAgents(10);
if (GUILayout.Button("100")) CreateAgents(100);
if (GUILayout.Button("500")) CreateAgents(500);
if (GUILayout.Button("1000")) CreateAgents(1000);
if (GUILayout.Button("5000")) CreateAgents(5000);
GUILayout.Space(5);
if (GUILayout.Button("Random Streams")) {
type = RVOExampleType.RandomStreams;
CreateAgents(agents != null ? agents.Count : 100);
}
if (GUILayout.Button("Line")) {
type = RVOExampleType.Line;
CreateAgents(agents != null ? Mathf.Min(agents.Count, 100) : 10);
}
if (GUILayout.Button("Circle")) {
type = RVOExampleType.Circle;
CreateAgents(agents != null ? agents.Count : 100);
}
if (GUILayout.Button("Point")) {
type = RVOExampleType.Point;
CreateAgents(agents != null ? agents.Count : 100);
}
if (GUILayout.Button("Crossing")) {
type = RVOExampleType.Crossing;
CreateAgents(agents != null ? agents.Count : 100);
}
}
private float uniformDistance (float radius) {
float v = Random.value + Random.value;
if (v > 1) return radius * (2-v);
else return radius * v;
}
/// <summary>Create a number of agents in circle and restart simulation</summary>
public void CreateAgents (int num) {
this.agentCount = num;
agents = new List<IAgent>(agentCount);
goals = new List<Vector3>(agentCount);
colors = new List<Color>(agentCount);
sim.ClearAgents();
if (type == RVOExampleType.Circle) {
float circleRad = Mathf.Sqrt(agentCount * radius * radius * 4 / Mathf.PI) * exampleScale * 0.05f;
for (int i = 0; i < agentCount; i++) {
Vector3 pos = new Vector3(Mathf.Cos(i * Mathf.PI * 2.0f / agentCount), 0, Mathf.Sin(i * Mathf.PI * 2.0f / agentCount)) * circleRad * (1 + Random.value * 0.01f);
IAgent agent = sim.AddAgent(new Vector2(pos.x, pos.z), pos.y);
agents.Add(agent);
goals.Add(-pos);
colors.Add(AstarMath.HSVToRGB(i * 360.0f / agentCount, 0.8f, 0.6f));
}
} else if (type == RVOExampleType.Line) {
for (int i = 0; i < agentCount; i++) {
Vector3 pos = new Vector3((i % 2 == 0 ? 1 : -1) * exampleScale, 0, (i / 2) * radius * 2.5f);
IAgent agent = sim.AddAgent(new Vector2(pos.x, pos.z), pos.y);
agents.Add(agent);
goals.Add(new Vector3(-pos.x, pos.y, pos.z));
colors.Add(i % 2 == 0 ? Color.red : Color.blue);
}
} else if (type == RVOExampleType.Point) {
for (int i = 0; i < agentCount; i++) {
Vector3 pos = new Vector3(Mathf.Cos(i * Mathf.PI * 2.0f / agentCount), 0, Mathf.Sin(i * Mathf.PI * 2.0f / agentCount)) * exampleScale;
IAgent agent = sim.AddAgent(new Vector2(pos.x, pos.z), pos.y);
agents.Add(agent);
goals.Add(new Vector3(0, pos.y, 0));
colors.Add(AstarMath.HSVToRGB(i * 360.0f / agentCount, 0.8f, 0.6f));
}
} else if (type == RVOExampleType.RandomStreams) {
float circleRad = Mathf.Sqrt(agentCount * radius * radius * 4 / Mathf.PI) * exampleScale * 0.05f;
for (int i = 0; i < agentCount; i++) {
float angle = Random.value * Mathf.PI * 2.0f;
float targetAngle = Random.value * Mathf.PI * 2.0f;
Vector3 pos = new Vector3(Mathf.Cos(angle), 0, Mathf.Sin(angle)) * uniformDistance(circleRad);
IAgent agent = sim.AddAgent(new Vector2(pos.x, pos.z), pos.y);
agents.Add(agent);
goals.Add(new Vector3(Mathf.Cos(targetAngle), 0, Mathf.Sin(targetAngle)) * uniformDistance(circleRad));
colors.Add(AstarMath.HSVToRGB(targetAngle * Mathf.Rad2Deg, 0.8f, 0.6f));
}
} else if (type == RVOExampleType.Crossing) {
float distanceBetweenGroups = exampleScale * radius * 0.5f;
int directions = (int)Mathf.Sqrt(agentCount / 25f);
directions = Mathf.Max(directions, 2);
const int AgentsPerDistance = 10;
for (int i = 0; i < agentCount; i++) {
float angle = ((i % directions)/(float)directions) * Mathf.PI * 2.0f;
var dist = distanceBetweenGroups * ((i/(directions*AgentsPerDistance) + 1) + 0.3f*Random.value);
Vector3 pos = new Vector3(Mathf.Cos(angle), 0, Mathf.Sin(angle)) * dist;
IAgent agent = sim.AddAgent(new Vector2(pos.x, pos.z), pos.y);
agent.Priority = (i % directions) == 0 ? 1 : 0.01f;
agents.Add(agent);
goals.Add(-pos.normalized * distanceBetweenGroups * 3);
colors.Add(AstarMath.HSVToRGB(angle * Mathf.Rad2Deg, 0.8f, 0.6f));
}
}
SetAgentSettings();
verts = new Vector3[4*agents.Count];
uv = new Vector2[verts.Length];
tris = new int[agents.Count*2*3];
meshColors = new Color[verts.Length];
}
void SetAgentSettings () {
for (int i = 0; i < agents.Count; i++) {
IAgent agent = agents[i];
agent.Radius = radius;
agent.AgentTimeHorizon = agentTimeHorizon;
agent.ObstacleTimeHorizon = obstacleTimeHorizon;
agent.MaxNeighbours = maxNeighbours;
agent.DebugDraw = i == 0 && debug;
}
}
public void Update () {
if (agents == null || mesh == null) return;
if (agents.Count != goals.Count) {
Debug.LogError("Agent count does not match goal count");
return;
}
SetAgentSettings();
// Make sure the array is large enough
if (interpolatedVelocities == null || interpolatedVelocities.Length < agents.Count) {
var velocities = new Vector2[agents.Count];
var directions = new Vector2[agents.Count];
// Copy over the old velocities
if (interpolatedVelocities != null) for (int i = 0; i < interpolatedVelocities.Length; i++) velocities[i] = interpolatedVelocities[i];
if (interpolatedRotations != null) for (int i = 0; i < interpolatedRotations.Length; i++) directions[i] = interpolatedRotations[i];
interpolatedVelocities = velocities;
interpolatedRotations = directions;
}
for (int i = 0; i < agents.Count; i++) {
IAgent agent = agents[i];
// Move agent
// This is the responsibility of this script, not the RVO system
Vector2 pos = agent.Position;
var deltaPosition = Vector2.ClampMagnitude(agent.CalculatedTargetPoint - pos, agent.CalculatedSpeed * Time.deltaTime);
pos += deltaPosition;
agent.Position = pos;
// All agents are on the same plane
agent.ElevationCoordinate = 0;
// Set the desired velocity for all agents
var target = new Vector2(goals[i].x, goals[i].z);
var dist = (target - pos).magnitude;
agent.SetTarget(target, Mathf.Min(dist, maxSpeed), maxSpeed*1.1f);
interpolatedVelocities[i] += deltaPosition;
if (interpolatedVelocities[i].magnitude > maxSpeed*0.1f) {
interpolatedVelocities[i] = Vector2.ClampMagnitude(interpolatedVelocities[i], maxSpeed*0.1f);
interpolatedRotations[i] = Vector2.Lerp(interpolatedRotations[i], interpolatedVelocities[i], agent.CalculatedSpeed * Time.deltaTime*4f);
}
//Debug.DrawRay(new Vector3(pos.x, 0, pos.y), new Vector3(interpolatedVelocities[i].x, 0, interpolatedVelocities[i].y) * 10);
// Create a square with the "forward" direction along the agent's velocity
Vector3 forward = new Vector3(interpolatedRotations[i].x, 0, interpolatedRotations[i].y).normalized * agent.Radius;
if (forward == Vector3.zero) forward = new Vector3(0, 0, agent.Radius);
Vector3 right = Vector3.Cross(Vector3.up, forward);
Vector3 orig = new Vector3(agent.Position.x, agent.ElevationCoordinate, agent.Position.y) + renderingOffset;
int vc = 4*i;
int tc = 2*3*i;
verts[vc+0] = (orig + forward - right);
verts[vc+1] = (orig + forward + right);
verts[vc+2] = (orig - forward + right);
verts[vc+3] = (orig - forward - right);
uv[vc+0] = (new Vector2(0, 1));
uv[vc+1] = (new Vector2(1, 1));
uv[vc+2] = (new Vector2(1, 0));
uv[vc+3] = (new Vector2(0, 0));
meshColors[vc+0] = colors[i];
meshColors[vc+1] = colors[i];
meshColors[vc+2] = colors[i];
meshColors[vc+3] = colors[i];
tris[tc+0] = (vc + 0);
tris[tc+1] = (vc + 1);
tris[tc+2] = (vc + 2);
tris[tc+3] = (vc + 0);
tris[tc+4] = (vc + 2);
tris[tc+5] = (vc + 3);
}
//Update the mesh
mesh.Clear();
mesh.vertices = verts;
mesh.uv = uv;
mesh.colors = meshColors;
mesh.triangles = tris;
mesh.RecalculateNormals();
}
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: cd22169e5a88449fca9e480b59dae980
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: a72d110e16b2e46b58db5ecb9717f37f

View File

@@ -0,0 +1,260 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400000}
- 33: {fileID: 3300000}
- 23: {fileID: 2300000}
m_Layer: 1
m_Name: Plane
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1002 &100001
EditorExtensionImpl:
serializedVersion: 6
--- !u!1 &100002
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400002}
- 114: {fileID: 11400004}
- 114: {fileID: 11400002}
- 114: {fileID: 11400000}
- 114: {fileID: 11400006}
- 114: {fileID: 11435192}
m_Layer: 1
m_Name: RVOAgent
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1002 &100003
EditorExtensionImpl:
serializedVersion: 6
--- !u!4 &400000
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_LocalRotation: {x: .707106829, y: 0, z: 0, w: .707106709}
m_LocalPosition: {x: 0, y: .5, z: 0}
m_LocalScale: {x: 4, y: 4, z: 4}
m_Children: []
m_Father: {fileID: 400002}
m_RootOrder: 0
--- !u!1002 &400001
EditorExtensionImpl:
serializedVersion: 6
--- !u!4 &400002
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_LocalRotation: {x: 0, y: .744024038, z: 0, w: .668152869}
m_LocalPosition: {x: -137.572372, y: 5.37771606, z: 191.384979}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 400000}
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!1002 &400003
EditorExtensionImpl:
serializedVersion: 6
--- !u!23 &2300000
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_Materials:
- {fileID: 2100000, guid: 6ac95c099f0e2ad4d90aa8dbf92a6f5d, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: .5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!1002 &2300001
EditorExtensionImpl:
serializedVersion: 6
--- !u!33 &3300000
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1002 &3300001
EditorExtensionImpl:
serializedVersion: 6
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 77f586f285b3847808d79083bd19ef1f, type: 3}
m_Name:
m_EditorClassIdentifier:
unwrap: 1
splitAtEveryPortal: 0
--- !u!1002 &11400001
EditorExtensionImpl:
serializedVersion: 6
--- !u!114 &11400002
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 373b52eb9bf8c40f785bb6947a1aee66, type: 3}
m_Name:
m_EditorClassIdentifier:
drawGizmos: 0
detailedGizmos: 0
startEndModifier:
addPoints: 0
exactStartPoint: 1
exactEndPoint: 3
useRaycasting: 0
mask:
serializedVersion: 2
m_Bits: 4294967295
useGraphRaycasting: 0
traversableTags: -1
traversableTagsCompatibility:
tagsChange: -1
tagsSet: -1
tagPenalties: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
--- !u!1002 &11400003
EditorExtensionImpl:
serializedVersion: 6
--- !u!114 &11400004
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 67057d14b4f9f4919958ec635b71f22b, type: 3}
m_Name:
m_EditorClassIdentifier:
repathRate: 1
maxSpeed: 10
moveNextDist: 5
slowdownDistance: 5
groundMask:
serializedVersion: 2
m_Bits: 1
--- !u!1002 &11400005
EditorExtensionImpl:
serializedVersion: 6
--- !u!114 &11400006
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cb6a34d769a1e4ac7b0b30e433aa443c, type: 3}
m_Name:
m_EditorClassIdentifier:
smoothType: 2
subdivisions: 2
iterations: 2
strength: .5
uniformLength: 1
maxSegmentLength: 2
bezierTangentLength: .400000006
offset: 2
factor: .100000001
--- !u!1002 &11400007
EditorExtensionImpl:
serializedVersion: 6
--- !u!114 &11435192
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 560112f876f5746c780eca0d404e7139, type: 3}
m_Name:
m_EditorClassIdentifier:
radius: 2
height: 4
locked: 0
lockWhenNotMoving: 0
agentTimeHorizon: 2
obstacleTimeHorizon: 2
maxNeighbours: 10
layer: 1
collidesWith: -5
wallAvoidForce: 1
wallAvoidFalloff: 1
priority: .5
center: 2
debug: 0
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 0}
propertyPath: maxSpeed
value: 10
objectReference: {fileID: 0}
- target: {fileID: 0}
propertyPath: center
value: 2
objectReference: {fileID: 0}
- target: {fileID: 0}
propertyPath: slowdownDistance
value: 5
objectReference: {fileID: 0}
- target: {fileID: 0}
propertyPath: groundMask.m_Bits
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 100002}
m_IsPrefabParent: 1
--- !u!1002 &100100001
EditorExtensionImpl:
serializedVersion: 6

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: dbf1877db1c4f4ff3930d903c0f5bb28

View File

@@ -0,0 +1,57 @@
using UnityEngine;
using System.Collections;
namespace Pathfinding.Examples {
/// <summary>
/// Places ROV agents in circles.
/// Used in a example scene
/// </summary>
[HelpURL("https://arongranberg.com/astar/documentation/stable/class_pathfinding_1_1_examples_1_1_r_v_o_agent_placer.php")]
public class RVOAgentPlacer : MonoBehaviour {
public int agents = 100;
public float ringSize = 100;
public LayerMask mask;
public GameObject prefab;
public Vector3 goalOffset;
public float repathRate = 1;
// Use this for initialization
IEnumerator Start () {
yield return null;
for (int i = 0; i < agents; i++) {
float angle = ((float)i / agents)*(float)System.Math.PI*2;
Vector3 pos = new Vector3((float)System.Math.Cos(angle), 0, (float)System.Math.Sin(angle))*ringSize;
Vector3 antipodal = -pos + goalOffset;
GameObject go = GameObject.Instantiate(prefab, Vector3.zero, Quaternion.Euler(0, angle+180, 0)) as GameObject;
RVOExampleAgent ag = go.GetComponent<RVOExampleAgent>();
if (ag == null) {
Debug.LogError("Prefab does not have an RVOExampleAgent component attached");
yield break;
}
//ag.radius = radius;
go.transform.parent = transform;
go.transform.position = pos;
ag.repathRate = repathRate;
ag.SetTarget(antipodal);
ag.SetColor(GetColor(angle));
}
}
const float rad2Deg = 360.0f/ ((float)System.Math.PI*2);
public Color GetColor (float angle) {
return AstarMath.HSVToRGB(angle * rad2Deg, 0.8f, 0.6f);
}
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c42c8ec55e7cf4e76b727f9cde90212d
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}

View File

@@ -0,0 +1,196 @@
using UnityEngine;
using System.Collections.Generic;
using Pathfinding.RVO;
namespace Pathfinding.Examples {
/// <summary>
/// Example movement script for using RVO.
///
/// Primarily intended for the example scenes.
/// You can use the AIPath or RichAI movement scripts in your own projects.
///
/// See: <see cref="Pathfinding.AIPath"/>
/// See: <see cref="Pathfinding.RichAI"/>
/// See: <see cref="Pathfinding.RVO.RVOController"/>
/// </summary>
[RequireComponent(typeof(RVOController))]
[RequireComponent(typeof(Seeker))]
[HelpURL("https://arongranberg.com/astar/documentation/stable/class_pathfinding_1_1_examples_1_1_r_v_o_example_agent.php")]
public class RVOExampleAgent : MonoBehaviour {
public float repathRate = 1;
private float nextRepath = 0;
private Vector3 target;
private bool canSearchAgain = true;
private RVOController controller;
public float maxSpeed = 10;
Path path = null;
List<Vector3> vectorPath;
int wp;
public float moveNextDist = 1;
public float slowdownDistance = 1;
public LayerMask groundMask;
Seeker seeker;
MeshRenderer[] rends;
public void Awake () {
seeker = GetComponent<Seeker>();
controller = GetComponent<RVOController>();
}
/// <summary>Set the point to move to</summary>
public void SetTarget (Vector3 target) {
this.target = target;
RecalculatePath();
}
/// <summary>Animate the change of color</summary>
public void SetColor (Color color) {
if (rends == null) rends = GetComponentsInChildren<MeshRenderer>();
foreach (MeshRenderer rend in rends) {
Color current = rend.material.GetColor("_TintColor");
AnimationCurve curveR = AnimationCurve.Linear(0, current.r, 1, color.r);
AnimationCurve curveG = AnimationCurve.Linear(0, current.g, 1, color.g);
AnimationCurve curveB = AnimationCurve.Linear(0, current.b, 1, color.b);
AnimationClip clip = new AnimationClip();
#if !(UNITY_4_3 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8)
// Needed to make Unity5 happy
clip.legacy = true;
#endif
clip.SetCurve("", typeof(Material), "_TintColor.r", curveR);
clip.SetCurve("", typeof(Material), "_TintColor.g", curveG);
clip.SetCurve("", typeof(Material), "_TintColor.b", curveB);
Animation anim = rend.gameObject.GetComponent<Animation>();
if (anim == null) {
anim = rend.gameObject.AddComponent<Animation>();
}
clip.wrapMode = WrapMode.Once;
anim.AddClip(clip, "ColorAnim");
anim.Play("ColorAnim");
}
}
public void RecalculatePath () {
canSearchAgain = false;
nextRepath = Time.time+repathRate*(Random.value+0.5f);
seeker.StartPath(transform.position, target, OnPathComplete);
}
public void OnPathComplete (Path _p) {
ABPath p = _p as ABPath;
canSearchAgain = true;
if (path != null) path.Release(this);
path = p;
p.Claim(this);
if (p.error) {
wp = 0;
vectorPath = null;
return;
}
Vector3 p1 = p.originalStartPoint;
Vector3 p2 = transform.position;
p1.y = p2.y;
float d = (p2-p1).magnitude;
wp = 0;
vectorPath = p.vectorPath;
Vector3 waypoint;
if (moveNextDist > 0) {
for (float t = 0; t <= d; t += moveNextDist*0.6f) {
wp--;
Vector3 pos = p1 + (p2-p1)*t;
do {
wp++;
waypoint = vectorPath[wp];
} while (controller.To2D(pos - waypoint).sqrMagnitude < moveNextDist*moveNextDist && wp != vectorPath.Count-1);
}
}
}
public void Update () {
if (Time.time >= nextRepath && canSearchAgain) {
RecalculatePath();
}
Vector3 pos = transform.position;
if (vectorPath != null && vectorPath.Count != 0) {
while ((controller.To2D(pos - vectorPath[wp]).sqrMagnitude < moveNextDist*moveNextDist && wp != vectorPath.Count-1) || wp == 0) {
wp++;
}
// Current path segment goes from vectorPath[wp-1] to vectorPath[wp]
// We want to find the point on that segment that is 'moveNextDist' from our current position.
// This can be visualized as finding the intersection of a circle with radius 'moveNextDist'
// centered at our current position with that segment.
var p1 = vectorPath[wp-1];
var p2 = vectorPath[wp];
// Calculate the intersection with the circle. This involves some math.
var t = VectorMath.LineCircleIntersectionFactor(controller.To2D(transform.position), controller.To2D(p1), controller.To2D(p2), moveNextDist);
// Clamp to a point on the segment
t = Mathf.Clamp01(t);
Vector3 waypoint = Vector3.Lerp(p1, p2, t);
// Calculate distance to the end of the path
float remainingDistance = controller.To2D(waypoint - pos).magnitude + controller.To2D(waypoint - p2).magnitude;
for (int i = wp; i < vectorPath.Count - 1; i++) remainingDistance += controller.To2D(vectorPath[i+1] - vectorPath[i]).magnitude;
// Set the target to a point in the direction of the current waypoint at a distance
// equal to the remaining distance along the path. Since the rvo agent assumes that
// it should stop when it reaches the target point, this will produce good avoidance
// behavior near the end of the path. When not close to the end point it will act just
// as being commanded to move in a particular direction, not toward a particular point
var rvoTarget = (waypoint - pos).normalized * remainingDistance + pos;
// When within [slowdownDistance] units from the target, use a progressively lower speed
var desiredSpeed = Mathf.Clamp01(remainingDistance / slowdownDistance) * maxSpeed;
Debug.DrawLine(transform.position, waypoint, Color.red);
controller.SetTarget(rvoTarget, desiredSpeed, maxSpeed);
} else {
// Stand still
controller.SetTarget(pos, maxSpeed, maxSpeed);
}
// Get a processed movement delta from the rvo controller and move the character.
// This is based on information from earlier frames.
var movementDelta = controller.CalculateMovementDelta(Time.deltaTime);
pos += movementDelta;
// Rotate the character if the velocity is not extremely small
if (Time.deltaTime > 0 && movementDelta.magnitude / Time.deltaTime > 0.01f) {
var rot = transform.rotation;
var targetRot = Quaternion.LookRotation(movementDelta, controller.To3D(Vector2.zero, 1));
const float RotationSpeed = 5;
if (controller.movementPlane == MovementPlane.XY) {
targetRot = targetRot * Quaternion.Euler(-90, 180, 0);
}
transform.rotation = Quaternion.Slerp(rot, targetRot, Time.deltaTime * RotationSpeed);
}
if (controller.movementPlane == MovementPlane.XZ) {
RaycastHit hit;
if (Physics.Raycast(pos + Vector3.up, Vector3.down, out hit, 2, groundMask)) {
pos.y = hit.point.y;
}
}
transform.position = pos;
}
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 67057d14b4f9f4919958ec635b71f22b
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}

View File

@@ -0,0 +1,856 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 1
m_BakeResolution: 50
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 0
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 0
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_MixedBakeMode: 1
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 500
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 0
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 0
--- !u!196 &5
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666666
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &157608482
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 157608483}
- component: {fileID: 157608487}
- component: {fileID: 157608485}
- component: {fileID: 157608486}
- component: {fileID: 157608484}
m_Layer: 0
m_Name: RVOSimulator
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &157608483
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 157608482}
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: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &157608484
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 157608482}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 6ac95c099f0e2ad4d90aa8dbf92a6f5d, type: 2}
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: 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!33 &157608485
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 157608482}
m_Mesh: {fileID: 0}
--- !u!114 &157608486
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 157608482}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cd22169e5a88449fca9e480b59dae980, type: 3}
m_Name:
m_EditorClassIdentifier:
agentCount: 300
exampleScale: 80
type: 3
radius: 1.5
maxSpeed: 5
agentTimeHorizon: 2
obstacleTimeHorizon: 10
maxNeighbours: 10
renderingOffset: {x: 0, y: 1, z: 0}
debug: 0
--- !u!114 &157608487
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 157608482}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1764de1de43cc4d19af52679d3eaae06, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 1
desiredSimulationFPS: 20
workerThreads: -1
doubleBuffering: 1
symmetryBreakingBias: 0.1
movementPlane: 0
drawObstacles: 0
--- !u!1 &581733579
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 581733580}
- component: {fileID: 581733583}
- component: {fileID: 581733582}
- component: {fileID: 581733581}
m_Layer: 0
m_Name: Description
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &581733580
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 581733579}
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: 1192988233}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -10, y: -10}
m_SizeDelta: {x: 400, y: 300}
m_Pivot: {x: 1, y: 1}
--- !u!114 &581733581
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 581733579}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cfabb0440166ab443bba8876756fdfa9, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5}
m_EffectDistance: {x: 1, y: -1}
m_UseGraphicAlpha: 1
--- !u!114 &581733582
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 581733579}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, 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_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 2
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'Local Avoidance Example
Units are rendered on a
single mesh
for performance
No pathfinding is done in this example'
--- !u!222 &581733583
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 581733579}
m_CullTransparentMesh: 0
--- !u!1 &687969035
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 687969039}
- component: {fileID: 687969038}
- component: {fileID: 687969037}
- component: {fileID: 687969036}
m_Layer: 0
m_Name: Plane
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!23 &687969036
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 687969035}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 8f4d5503fdeab441e8c6c041504cf535, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 0.8
m_ReceiveGI: 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!64 &687969037
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 687969035}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 0
m_CookingOptions: 14
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &687969038
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 687969035}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &687969039
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 687969035}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -0.1, z: 0}
m_LocalScale: {x: 62.87725, y: 1, z: 62.87725}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &910242485
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 910242486}
- component: {fileID: 910242488}
- component: {fileID: 910242489}
- component: {fileID: 910242487}
m_Layer: 0
m_Name: Plane
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &910242486
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 910242485}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -0.2, z: 0}
m_LocalScale: {x: 62.877247, y: 1, z: 62.87725}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &910242487
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 910242485}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: b71b71b0a1f9a48768a27ca6eefcfbdf, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 0.8
m_ReceiveGI: 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!33 &910242488
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 910242485}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!64 &910242489
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 910242485}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 0
m_CookingOptions: 14
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &924212660
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 924212661}
- component: {fileID: 924212662}
- component: {fileID: 924212665}
- component: {fileID: 924212663}
- component: {fileID: 924212666}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &924212661
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 924212660}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 151.15788, z: 0.000018019422}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!20 &924212662
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 924212660}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0.019607844}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 10
far clip plane: 1400
field of view: 60
orthographic: 0
orthographic size: 100
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!81 &924212663
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 924212660}
m_Enabled: 1
--- !u!124 &924212665
Behaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 924212660}
m_Enabled: 1
--- !u!114 &924212666
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 924212660}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: db9dd0f9051524c2c87924ce0b79f2a6, type: 3}
m_Name:
m_EditorClassIdentifier:
selectionBox:
m_Name:
m_Normal:
m_Background: {fileID: 0}
m_ScaledBackgrounds: []
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_Hover:
m_Background: {fileID: 0}
m_ScaledBackgrounds: []
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_Active:
m_Background: {fileID: 0}
m_ScaledBackgrounds: []
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_Focused:
m_Background: {fileID: 0}
m_ScaledBackgrounds: []
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_OnNormal:
m_Background: {fileID: 0}
m_ScaledBackgrounds: []
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_OnHover:
m_Background: {fileID: 0}
m_ScaledBackgrounds: []
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_OnActive:
m_Background: {fileID: 0}
m_ScaledBackgrounds: []
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_OnFocused:
m_Background: {fileID: 0}
m_ScaledBackgrounds: []
m_TextColor: {r: 0, g: 0, b: 0, a: 1}
m_Border:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_Margin:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_Overflow:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_Font: {fileID: 0}
m_FontSize: 0
m_FontStyle: 0
m_Alignment: 0
m_WordWrap: 0
m_RichText: 1
m_TextClipping: 1
m_ImagePosition: 0
m_ContentOffset: {x: 0, y: 0}
m_FixedWidth: 0
m_FixedHeight: 0
m_StretchWidth: 1
m_StretchHeight: 0
adjustCamera: 1
--- !u!1 &1192988231
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1192988233}
- component: {fileID: 1192988232}
m_Layer: 0
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!223 &1192988232
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1192988231}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 1
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &1192988233
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1192988231}
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_Children:
- {fileID: 581733580}
m_Father: {fileID: 0}
m_RootOrder: 5
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 &1813726531
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1813726532}
- component: {fileID: 1813726533}
m_Layer: 0
m_Name: Directional light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1813726532
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1813726531}
m_LocalRotation: {x: 0.3535534, y: 0.3535534, z: -0.14644665, w: 0.85355335}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!108 &1813726533
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1813726531}
m_Enabled: 1
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 1.4
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 1
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 2
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_ShadowRadius: 0
m_ShadowAngle: 10

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 6bfac68e208594c79a32892bbc28dc1e

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 92aac0fea0f5e43e1a179927f0f9d953
TextureImporter:
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
textureType: -1
buildTargetSettings: []

View File

@@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: bd410e8a816334db3beb2aa458e97c12
folderAsset: yes
DefaultImporter:
userData:

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 9df9f020877fb4842b75396ddf708b69
DefaultImporter:
userData:

View File

@@ -0,0 +1,83 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400000}
- 33: {fileID: 3300000}
- 23: {fileID: 2300000}
- 65: {fileID: 6500000}
m_Layer: 0
m_Name: ProceduralGround
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &400000
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 10, y: 10, z: 10}
m_Children: []
m_Father: {fileID: 0}
--- !u!23 &2300000
Renderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_LightmapIndex: 0
m_LightmapTilingOffset: {x: .390625, y: .78125, z: .000488280988, w: .000976561976}
m_Materials:
- {fileID: 2100000, guid: 3219de2d574674beb889c87b844502b5, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_LightProbeAnchor: {fileID: 0}
m_ScaleInLightmap: .5
m_SortingLayer: 0
m_SortingOrder: 0
m_SortingLayerID: 0
--- !u!33 &3300000
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &6500000
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 10, y: .00999999978, z: 10}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 100000}
m_IsPrefabParent: 1
m_IsExploded: 1

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 61432558c555740a38a88fa99d358883
NativeFormatImporter:
userData:

View File

@@ -0,0 +1,111 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400000}
m_Layer: 1
m_Name: ProceduralPrefab1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &100002
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400002}
- 33: {fileID: 3300000}
- 136: {fileID: 13600000}
- 23: {fileID: 2300000}
m_Layer: 1
m_Name: Cylinder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &400000
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 28.3519249, y: 0, z: -8.94069672e-08}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 400002}
m_Father: {fileID: 0}
--- !u!4 &400002
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 400000}
--- !u!23 &2300000
Renderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_LightmapIndex: 255
m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
m_Materials:
- {fileID: 2100000, guid: 99dbb3f3abc3c4845a9b650ff678e7c1, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_LightProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_SortingLayer: 0
m_SortingOrder: 0
m_SortingLayerID: 0
--- !u!33 &3300000
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Mesh: {fileID: 4300000, guid: 436b69414b04047fca3929c70df57c4f, type: 3}
--- !u!136 &13600000
CapsuleCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: .5
m_Height: 2
m_Direction: 1
m_Center: {x: 0, y: 0, z: 0}
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 100000}
m_IsPrefabParent: 1
m_IsExploded: 1

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: b11992e5e8afb4e63a1ccab9daf6f07c
NativeFormatImporter:
userData:

View File

@@ -0,0 +1,253 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400000}
- 33: {fileID: 3300000}
- 136: {fileID: 13600000}
- 23: {fileID: 2300000}
m_Layer: 1
m_Name: Cylinder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &100002
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400002}
m_Layer: 1
m_Name: ProceduralPrefab2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &100004
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400004}
- 33: {fileID: 3300002}
- 136: {fileID: 13600002}
- 23: {fileID: 2300002}
m_Layer: 1
m_Name: Cylinder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &100006
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400006}
- 33: {fileID: 3300004}
- 136: {fileID: 13600004}
- 23: {fileID: 2300004}
m_Layer: 1
m_Name: Cylinder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &400000
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_LocalRotation: {x: .5, y: -.500000119, z: .5, w: .49999994}
m_LocalPosition: {x: 0, y: 1, z: -0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 400002}
--- !u!4 &400002
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 37.0020599, y: 0, z: 1.5534935}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 400006}
- {fileID: 400004}
- {fileID: 400000}
m_Father: {fileID: 0}
--- !u!4 &400004
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100004}
m_LocalRotation: {x: .707106829, y: 0, z: 0, w: .707106709}
m_LocalPosition: {x: 0, y: 1, z: -0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 400002}
--- !u!4 &400006
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 400002}
--- !u!23 &2300000
Renderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_LightmapIndex: 255
m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
m_Materials:
- {fileID: 2100000, guid: 99dbb3f3abc3c4845a9b650ff678e7c1, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_LightProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_SortingLayer: 0
m_SortingOrder: 0
m_SortingLayerID: 0
--- !u!23 &2300002
Renderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100004}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_LightmapIndex: 255
m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
m_Materials:
- {fileID: 2100000, guid: 99dbb3f3abc3c4845a9b650ff678e7c1, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_LightProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_SortingLayer: 0
m_SortingOrder: 0
m_SortingLayerID: 0
--- !u!23 &2300004
Renderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_LightmapIndex: 255
m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
m_Materials:
- {fileID: 2100000, guid: 20e84239fa93246fe8f7f753e8ee4ef2, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_LightProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_SortingLayer: 0
m_SortingOrder: 0
m_SortingLayerID: 0
--- !u!33 &3300000
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Mesh: {fileID: 4300000, guid: 436b69414b04047fca3929c70df57c4f, type: 3}
--- !u!33 &3300002
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100004}
m_Mesh: {fileID: 4300000, guid: 436b69414b04047fca3929c70df57c4f, type: 3}
--- !u!33 &3300004
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
m_Mesh: {fileID: 4300000, guid: 436b69414b04047fca3929c70df57c4f, type: 3}
--- !u!136 &13600000
CapsuleCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: .5
m_Height: 2
m_Direction: 1
m_Center: {x: 0, y: 0, z: 0}
--- !u!136 &13600002
CapsuleCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100004}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: .5
m_Height: 2
m_Direction: 1
m_Center: {x: 0, y: 0, z: 0}
--- !u!136 &13600004
CapsuleCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: .5
m_Height: 2
m_Direction: 1
m_Center: {x: 0, y: 0, z: 0}
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 100002}
m_IsPrefabParent: 1
m_IsExploded: 1

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 1c63e47cea3074ee89305fd4cefa91e8
NativeFormatImporter:
userData:

View File

@@ -0,0 +1,320 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400000}
- 33: {fileID: 3300000}
- 65: {fileID: 6500000}
- 23: {fileID: 2300000}
m_Layer: 1
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &100002
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400002}
- 33: {fileID: 3300002}
- 65: {fileID: 6500002}
- 23: {fileID: 2300002}
m_Layer: 1
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &100004
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400004}
- 33: {fileID: 3300004}
- 65: {fileID: 6500004}
- 23: {fileID: 2300004}
m_Layer: 1
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &100006
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400006}
- 33: {fileID: 3300006}
- 65: {fileID: 6500006}
- 23: {fileID: 2300006}
m_Layer: 1
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &100008
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400008}
m_Layer: 1
m_Name: ProceduralPrefab3
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &400000
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_LocalRotation: {x: .270597726, y: .653281689, z: -.270597786, w: .653281569}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 5, y: 5, z: 5}
m_Children: []
m_Father: {fileID: 400008}
--- !u!4 &400002
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_LocalRotation: {x: .382683486, y: 0, z: 0, w: .923879504}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 5, y: 5, z: 5}
m_Children: []
m_Father: {fileID: 400008}
--- !u!4 &400004
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100004}
m_LocalRotation: {x: 0, y: .382683486, z: 0, w: .923879504}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 5, y: 5, z: 5}
m_Children: []
m_Father: {fileID: 400008}
--- !u!4 &400006
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 5, y: 5, z: 5}
m_Children: []
m_Father: {fileID: 400008}
--- !u!4 &400008
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100008}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 42.4285851, y: 0, z: -1.00235534}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 400006}
- {fileID: 400004}
- {fileID: 400002}
- {fileID: 400000}
m_Father: {fileID: 0}
--- !u!23 &2300000
Renderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_LightmapIndex: 255
m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
m_Materials:
- {fileID: 2100000, guid: b71b71b0a1f9a48768a27ca6eefcfbdf, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_LightProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_SortingLayer: 0
m_SortingOrder: 0
m_SortingLayerID: 0
--- !u!23 &2300002
Renderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_LightmapIndex: 255
m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
m_Materials:
- {fileID: 2100000, guid: b71b71b0a1f9a48768a27ca6eefcfbdf, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_LightProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_SortingLayer: 0
m_SortingOrder: 0
m_SortingLayerID: 0
--- !u!23 &2300004
Renderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100004}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_LightmapIndex: 255
m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
m_Materials:
- {fileID: 2100000, guid: b71b71b0a1f9a48768a27ca6eefcfbdf, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_LightProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_SortingLayer: 0
m_SortingOrder: 0
m_SortingLayerID: 0
--- !u!23 &2300006
Renderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_LightmapIndex: 255
m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
m_Materials:
- {fileID: 2100000, guid: b71b71b0a1f9a48768a27ca6eefcfbdf, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_LightProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_SortingLayer: 0
m_SortingOrder: 0
m_SortingLayerID: 0
--- !u!33 &3300000
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &3300002
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &3300004
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100004}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &3300006
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &6500000
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
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!65 &6500002
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
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!65 &6500004
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100004}
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!65 &6500006
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
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!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 100008}
m_IsPrefabParent: 1
m_IsExploded: 1

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 18cb121974c6b4be387c66d4e1ce5bf8
NativeFormatImporter:
userData:

View File

@@ -0,0 +1,420 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &105088
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 402290}
- 33: {fileID: 3349068}
- 65: {fileID: 6568724}
- 23: {fileID: 2324352}
m_Layer: 1
m_Name: Cube (4)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &110528
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 443002}
- 33: {fileID: 3385636}
- 65: {fileID: 6541864}
- 23: {fileID: 2376014}
m_Layer: 1
m_Name: Cube (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &134312
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 485982}
- 33: {fileID: 3367740}
- 65: {fileID: 6559214}
- 23: {fileID: 2321278}
m_Layer: 1
m_Name: Cube (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &144100
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 447580}
- 33: {fileID: 3300322}
- 65: {fileID: 6562542}
- 23: {fileID: 2328318}
m_Layer: 1
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &170398
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 465272}
- 33: {fileID: 3385444}
- 65: {fileID: 6579718}
- 23: {fileID: 2346316}
m_Layer: 1
m_Name: Cube (3)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &173226
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 441640}
m_Layer: 1
m_Name: ProceduralPrefab4
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &402290
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 105088}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 3.69000006, z: 0}
m_LocalScale: {x: .725257635, y: .221584246, z: .768708467}
m_Children: []
m_Father: {fileID: 441640}
m_RootOrder: 4
--- !u!4 &441640
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 173226}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 34.5099983, y: 0, z: -5.92999983}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 447580}
- {fileID: 485982}
- {fileID: 443002}
- {fileID: 465272}
- {fileID: 402290}
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!4 &443002
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 110528}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 3.05999994, z: 0}
m_LocalScale: {x: 1.99168217, y: .608508468, z: 2.11100578}
m_Children: []
m_Father: {fileID: 441640}
m_RootOrder: 2
--- !u!4 &447580
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 144100}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.48285031, y: 5, z: 1.51245952}
m_Children: []
m_Father: {fileID: 441640}
m_RootOrder: 0
--- !u!4 &465272
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 170398}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 3.4000001, z: 0}
m_LocalScale: {x: 1.33442724, y: .407700717, z: 1.41437399}
m_Children: []
m_Father: {fileID: 441640}
m_RootOrder: 3
--- !u!4 &485982
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 134312}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 2.68000007, z: 0}
m_LocalScale: {x: 2.64951539, y: .809492886, z: 2.80825019}
m_Children: []
m_Father: {fileID: 441640}
m_RootOrder: 1
--- !u!23 &2321278
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 134312}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_Materials:
- {fileID: 2100000, guid: 57eb4c059e0b3467cac0a46a3b859a2d, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: .5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!23 &2324352
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 105088}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_Materials:
- {fileID: 2100000, guid: 57eb4c059e0b3467cac0a46a3b859a2d, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: .5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!23 &2328318
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 144100}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_Materials:
- {fileID: 2100000, guid: 57eb4c059e0b3467cac0a46a3b859a2d, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: .5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!23 &2346316
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 170398}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_Materials:
- {fileID: 2100000, guid: 57eb4c059e0b3467cac0a46a3b859a2d, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: .5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!23 &2376014
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 110528}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_Materials:
- {fileID: 2100000, guid: 57eb4c059e0b3467cac0a46a3b859a2d, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: .5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!33 &3300322
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 144100}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &3349068
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 105088}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &3367740
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 134312}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &3385444
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 170398}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &3385636
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 110528}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &6541864
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 110528}
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!65 &6559214
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 134312}
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!65 &6562542
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 144100}
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!65 &6568724
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 105088}
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!65 &6579718
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 170398}
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!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 173226}
m_IsPrefabParent: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: df2342a101fc54b44811414aaee023ba
timeCreated: 1537827455
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,281 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace Pathfinding.Examples {
/// <summary>Example script for generating an infinite procedural world</summary>
[HelpURL("https://arongranberg.com/astar/documentation/stable/class_pathfinding_1_1_examples_1_1_procedural_world.php")]
public class ProceduralWorld : MonoBehaviour {
public Transform target;
public ProceduralPrefab[] prefabs;
/// <summary>How far away to generate tiles</summary>
public int range = 1;
public int disableAsyncLoadWithinRange = 1;
/// <summary>World size of tiles</summary>
public float tileSize = 100;
public int subTiles = 20;
/// <summary>
/// Enable static batching on generated tiles.
/// Will improve overall FPS, but might cause FPS drops on
/// some frames when static batching is done
/// </summary>
public bool staticBatching = false;
Queue<IEnumerator> tileGenerationQueue = new Queue<IEnumerator>();
public enum RotationRandomness {
AllAxes,
Y
}
[System.Serializable]
public class ProceduralPrefab {
/// <summary>Prefab to use</summary>
public GameObject prefab;
/// <summary>Number of objects per square world unit</summary>
public float density = 0;
/// <summary>
/// Multiply by [perlin noise].
/// Value from 0 to 1 indicating weight.
/// </summary>
public float perlin = 0;
/// <summary>
/// Perlin will be raised to this power.
/// A higher value gives more distinct edges
/// </summary>
public float perlinPower = 1;
/// <summary>Some offset to avoid identical density maps</summary>
public Vector2 perlinOffset = Vector2.zero;
/// <summary>
/// Perlin noise scale.
/// A higher value spreads out the maximums and minimums of the density.
/// </summary>
public float perlinScale = 1;
/// <summary>
/// Multiply by [random].
/// Value from 0 to 1 indicating weight.
/// </summary>
public float random = 1;
public RotationRandomness randomRotation = RotationRandomness.AllAxes;
/// <summary>If checked, a single object will be created in the center of each tile</summary>
public bool singleFixed = false;
}
/// <summary>All tiles</summary>
Dictionary<Int2, ProceduralTile> tiles = new Dictionary<Int2, ProceduralTile>();
// Use this for initialization
void Start () {
// Calculate the closest tiles
// and then recalculate the graph
Update();
AstarPath.active.Scan();
StartCoroutine(GenerateTiles());
}
// Update is called once per frame
void Update () {
// Calculate the tile the target is standing on
Int2 p = new Int2(Mathf.RoundToInt((target.position.x - tileSize*0.5f) / tileSize), Mathf.RoundToInt((target.position.z - tileSize*0.5f) / tileSize));
// Clamp range
range = range < 1 ? 1 : range;
// Remove tiles which are out of range
bool changed = true;
while (changed) {
changed = false;
foreach (KeyValuePair<Int2, ProceduralTile> pair in tiles) {
if (Mathf.Abs(pair.Key.x-p.x) > range || Mathf.Abs(pair.Key.y-p.y) > range) {
pair.Value.Destroy();
tiles.Remove(pair.Key);
changed = true;
break;
}
}
}
// Add tiles which have come in range
// and start calculating them
for (int x = p.x-range; x <= p.x+range; x++) {
for (int z = p.y-range; z <= p.y+range; z++) {
if (!tiles.ContainsKey(new Int2(x, z))) {
ProceduralTile tile = new ProceduralTile(this, x, z);
var generator = tile.Generate();
// Tick it one step forward
generator.MoveNext();
// Calculate the rest later
tileGenerationQueue.Enqueue(generator);
tiles.Add(new Int2(x, z), tile);
}
}
}
// The ones directly adjacent to the current one
// should always be completely calculated
// make sure they are
for (int x = p.x-disableAsyncLoadWithinRange; x <= p.x+disableAsyncLoadWithinRange; x++) {
for (int z = p.y-disableAsyncLoadWithinRange; z <= p.y+disableAsyncLoadWithinRange; z++) {
tiles[new Int2(x, z)].ForceFinish();
}
}
}
IEnumerator GenerateTiles () {
while (true) {
if (tileGenerationQueue.Count > 0) {
var generator = tileGenerationQueue.Dequeue();
yield return StartCoroutine(generator);
}
yield return null;
}
}
class ProceduralTile {
int x, z;
System.Random rnd;
ProceduralWorld world;
public bool destroyed { get; private set; }
public ProceduralTile (ProceduralWorld world, int x, int z) {
this.x = x;
this.z = z;
this.world = world;
rnd = new System.Random((x * 10007) ^ (z*36007));
}
Transform root;
IEnumerator ie;
public IEnumerator Generate () {
ie = InternalGenerate();
GameObject rt = new GameObject("Tile " + x + " " + z);
root = rt.transform;
while (ie != null && root != null && ie.MoveNext()) yield return ie.Current;
ie = null;
}
public void ForceFinish () {
while (ie != null && root != null && ie.MoveNext()) {}
ie = null;
}
Vector3 RandomInside () {
Vector3 v = new Vector3();
v.x = (x + (float)rnd.NextDouble())*world.tileSize;
v.z = (z + (float)rnd.NextDouble())*world.tileSize;
return v;
}
Vector3 RandomInside (float px, float pz) {
Vector3 v = new Vector3();
v.x = (px + (float)rnd.NextDouble()/world.subTiles)*world.tileSize;
v.z = (pz + (float)rnd.NextDouble()/world.subTiles)*world.tileSize;
return v;
}
Quaternion RandomYRot (ProceduralPrefab prefab) {
return prefab.randomRotation == RotationRandomness.AllAxes ? Quaternion.Euler(360*(float)rnd.NextDouble(), 360*(float)rnd.NextDouble(), 360*(float)rnd.NextDouble()) : Quaternion.Euler(0, 360 * (float)rnd.NextDouble(), 0);
}
IEnumerator InternalGenerate () {
Debug.Log("Generating tile " + x + ", " + z);
int counter = 0;
float[, ] ditherMap = new float[world.subTiles+2, world.subTiles+2];
//List<GameObject> objs = new List<GameObject>();
for (int i = 0; i < world.prefabs.Length; i++) {
ProceduralPrefab pref = world.prefabs[i];
if (pref.singleFixed) {
Vector3 p = new Vector3((x+0.5f) * world.tileSize, 0, (z+0.5f) * world.tileSize);
GameObject ob = GameObject.Instantiate(pref.prefab, p, Quaternion.identity) as GameObject;
ob.transform.parent = root;
} else {
float subSize = world.tileSize/world.subTiles;
for (int sx = 0; sx < world.subTiles; sx++) {
for (int sz = 0; sz < world.subTiles; sz++) {
ditherMap[sx+1, sz+1] = 0;
}
}
for (int sx = 0; sx < world.subTiles; sx++) {
for (int sz = 0; sz < world.subTiles; sz++) {
float px = x + sx/(float)world.subTiles;//sx / world.tileSize;
float pz = z + sz/(float)world.subTiles;//sz / world.tileSize;
float perl = Mathf.Pow(Mathf.PerlinNoise((px + pref.perlinOffset.x)*pref.perlinScale, (pz + pref.perlinOffset.y)*pref.perlinScale), pref.perlinPower);
float density = pref.density * Mathf.Lerp(1, perl, pref.perlin) * Mathf.Lerp(1, (float)rnd.NextDouble(), pref.random);
float fcount = subSize*subSize*density + ditherMap[sx+1, sz+1];
int count = Mathf.RoundToInt(fcount);
// Apply dithering
// See http://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering
ditherMap[sx+1+1, sz+1+0] += (7f/16f) * (fcount - count);
ditherMap[sx+1-1, sz+1+1] += (3f/16f) * (fcount - count);
ditherMap[sx+1+0, sz+1+1] += (5f/16f) * (fcount - count);
ditherMap[sx+1+1, sz+1+1] += (1f/16f) * (fcount - count);
// Create a number of objects
for (int j = 0; j < count; j++) {
// Find a random position inside the current sub-tile
Vector3 p = RandomInside(px, pz);
GameObject ob = GameObject.Instantiate(pref.prefab, p, RandomYRot(pref)) as GameObject;
ob.transform.parent = root;
//ob.SetActive ( false );
//objs.Add ( ob );
counter++;
if (counter % 2 == 0)
yield return null;
}
}
}
}
}
ditherMap = null;
yield return null;
yield return null;
//Batch everything for improved performance
if (Application.HasProLicense() && world.staticBatching) {
StaticBatchingUtility.Combine(root.gameObject);
}
}
public void Destroy () {
if (root != null) {
Debug.Log("Destroying tile " + x + ", " + z);
GameObject.Destroy(root.gameObject);
root = null;
}
// Make sure the tile generator coroutine is destroyed
ie = null;
}
}
}
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b265527da9152484fa74392751085576
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@@ -0,0 +1,28 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 3
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: TopDownOverlay
m_Shader: {fileID: 30, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: []
m_CustomRenderQueue: -1
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors:
data:
first:
name: _Color
second: {r: 0, g: 0, b: 0, a: .0980392173}

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: d3d92ca2f0e9e4bfb9c0fbe69453486a
NativeFormatImporter:
userData:

View File

@@ -0,0 +1,64 @@
fileFormatVersion: 2
guid: 436b69414b04047fca3929c70df57c4f
ModelImporter:
serializedVersion: 15
fileIDToRecycleName:
100000: //RootNode
400000: //RootNode
2300000: //RootNode
3300000: //RootNode
4300000: Cylinder
7400000: Default Take
9500000: //RootNode
materials:
importMaterials: 0
materialName: 0
materialSearch: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
optimizeGameObjects: 0
animationCompression: 1
animationRotationError: .5
animationPositionError: .5
animationScaleError: .5
animationWrapMode: 0
extraExposedTransformPaths: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
importBlendShapes: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
weldVertices: 1
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
tangentSpace:
normalSmoothAngle: 60
splitTangentsAcrossUV: 1
normalImportMode: 1
tangentImportMode: 1
importAnimation: 1
copyAvatar: 0
humanDescription:
human: []
skeleton: []
armTwist: .5
foreArmTwist: .5
upperLegTwist: .5
legTwist: .5
armStretch: .0500000007
legStretch: .0500000007
feetSpacing: 0
rootMotionBoneName:
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
userData:

View File

@@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 7abd07d72a20d46069e0d5d3c3e9bcca
folderAsset: yes
DefaultImporter:
userData:

View File

@@ -0,0 +1,95 @@
using UnityEngine;
namespace Pathfinding.Examples {
/// <summary>
/// Moves an object along a spline.
/// Helper script in the example scene called 'Moving'.
/// </summary>
[HelpURL("https://arongranberg.com/astar/documentation/stable/class_pathfinding_1_1_examples_1_1_bezier_mover.php")]
public class BezierMover : MonoBehaviour {
public Transform[] points;
public float speed = 1;
public float tiltAmount = 1f;
public float tiltSmoothing = 1.0f;
float time = 0;
Vector3 averageCurvature;
Vector3 Evaluate (float t, out Vector3 derivative, out Vector3 secondDerivative, out Vector3 curvature) {
int c = points.Length;
int pt = (Mathf.FloorToInt(t) + c) % c;
var p0 = points[(pt-1+c)%c].position;
var p1 = points[pt].position;
var p2 = points[(pt+1)%c].position;
var p3 = points[(pt+2)%c].position;
var tprime = t - Mathf.FloorToInt(t);
CatmullRomToBezier(p0, p1, p2, p3, out var c0, out var c1, out var c2, out var c3);
derivative = AstarSplines.CubicBezierDerivative(c0, c1, c2, c3, tprime);
secondDerivative = AstarSplines.CubicBezierSecondDerivative(c0, c1, c2, c3, tprime);
curvature = Curvature(derivative, secondDerivative);
return AstarSplines.CubicBezier(c0, c1, c2, c3, tprime);
}
/// <summary>Converts a catmull-rom spline to bezier control points</summary>
static void CatmullRomToBezier (Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, out Vector3 c0, out Vector3 c1, out Vector3 c2, out Vector3 c3) {
c0 = p1;
c1 = (-p0 + 6*p1 + 1*p2)*(1/6.0f);
c2 = (p1 + 6*p2 - p3)*(1/6.0f);
c3 = p2;
}
static Vector3 Curvature (Vector3 derivate, Vector3 secondDerivative) {
var dx = derivate.magnitude;
if (dx < 0.000001f) return Vector3.zero;
return Vector3.Cross(derivate, secondDerivative) / (dx*dx*dx);
}
/// <summary>Update is called once per frame</summary>
void Update () {
// Move the agent a small distance along the path, according to its speed
float mn = time;
float mx = time+1;
while (mx - mn > 0.0001f) {
float mid = (mn+mx)/2;
Vector3 p = Evaluate(mid, out var dummy1, out var dummy2, out var dummy3);
if ((p-transform.position).sqrMagnitude > (speed*Time.deltaTime)*(speed*Time.deltaTime)) {
mx = mid;
} else {
mn = mid;
}
}
time = (mn+mx)/2;
transform.position = Evaluate(time, out var derivative, out var dummy, out var curvature);
averageCurvature = Vector3.Lerp(averageCurvature, curvature, Time.deltaTime);
// Estimate the acceleration at the current point and use it to tilt the object inwards on the curve
var centripetalAcceleration = -Vector3.Cross(derivative.normalized, averageCurvature);
var up = new Vector3(0, 1/(tiltAmount + 0.00001f), 0) + centripetalAcceleration;
transform.rotation = Quaternion.LookRotation(derivative, up);
}
void OnDrawGizmos () {
if (points.Length >= 3) {
for (int i = 0; i < points.Length; i++) if (points[i] == null) return;
Gizmos.color = Color.white;
Vector3 pp = Evaluate(0, out var derivative, out var secondDerivative, out var curvature);
for (int pt = 0; pt < points.Length; pt++) {
for (int i = 1; i <= 100; i++) {
var p = Evaluate(pt + (i / 100f), out derivative, out secondDerivative, out curvature);
Gizmos.DrawLine(pp, p);
pp = p;
}
}
}
}
}
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0763f4ebc1f4946a1a250c08ae8f1cb0
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@@ -0,0 +1,25 @@
using UnityEngine;
namespace Pathfinding {
using Pathfinding.Util;
/// <summary>Helper for <see cref="Pathfinding.Examples.LocalSpaceRichAI"/></summary>
[HelpURL("https://arongranberg.com/astar/documentation/stable/class_pathfinding_1_1_local_space_graph.php")]
public class LocalSpaceGraph : VersionedMonoBehaviour {
Matrix4x4 originalMatrix;
public GraphTransform transformation { get; private set; }
void Start () {
originalMatrix = transform.worldToLocalMatrix;
transform.hasChanged = true;
Refresh();
}
public void Refresh () {
// Avoid updating the GraphTransform if the object has not moved
if (transform.hasChanged) {
transformation = new GraphTransform(transform.localToWorldMatrix * originalMatrix);
transform.hasChanged = false;
}
}
}
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 402bb27f2effb4bd183ec7f7dd47b078
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@@ -0,0 +1,63 @@
using UnityEngine;
namespace Pathfinding.Examples {
/// <summary>
/// RichAI for local space (pathfinding on moving graphs).
///
/// What this script does is that it fakes graph movement.
/// It can be seen in the example scene called 'Moving' where
/// a character is pathfinding on top of a moving ship.
/// The graph does not actually move in that example
/// instead there is some 'cheating' going on.
///
/// When requesting a path, we first transform
/// the start and end positions of the path request
/// into local space for the object we are moving on
/// (e.g the ship in the example scene), then when we get the
/// path back, they will still be in these local coordinates.
/// When following the path, we will every frame transform
/// the coordinates of the waypoints in the path to global
/// coordinates so that we can follow them.
///
/// At the start of the game (when the graph is scanned) the
/// object we are moving on should be at a valid position on the graph and
/// you should attach the <see cref="Pathfinding.LocalSpaceGraph"/> component to it. The <see cref="Pathfinding.LocalSpaceGraph"/>
/// component will store the position and orientation of the object right there are the start
/// and then we can use that information to transform coordinates back to that region of the graph
/// as if the object had not moved at all.
///
/// This functionality is only implemented for the RichAI
/// script, however it should not be hard to
/// use the same approach for other movement scripts.
/// </summary>
[HelpURL("https://arongranberg.com/astar/documentation/stable/class_pathfinding_1_1_examples_1_1_local_space_rich_a_i.php")]
public class LocalSpaceRichAI : RichAI {
/// <summary>Root of the object we are moving on</summary>
public LocalSpaceGraph graph;
void RefreshTransform () {
graph.Refresh();
richPath.transform = graph.transformation;
movementPlane = graph.transformation;
}
protected override void Start () {
RefreshTransform();
base.Start();
}
protected override void CalculatePathRequestEndpoints (out Vector3 start, out Vector3 end) {
RefreshTransform();
base.CalculatePathRequestEndpoints(out start, out end);
start = graph.transformation.InverseTransform(start);
end = graph.transformation.InverseTransform(end);
}
public override void OnSyncUpdate(int dt, JNFrameInfo frame, Object input)
{
RefreshTransform();
base.OnSyncUpdate(dt, frame, input);
}
}
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e342e9f54c9d04f05b77eff70a36605e
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 21723074617614fd089cd890cd851105
folderAsset: yes
DefaultImporter:
userData:

View File

@@ -0,0 +1,28 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 3
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: No Name
m_Shader: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: []
m_CustomRenderQueue: -1
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: adb67b32341a04fd98b9f93aef9b07b2
NativeFormatImporter:
userData:

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 4b00c6f950101422fa5468a704bece11
DefaultImporter:
userData:

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: e11f893ed7c0f4cfeb3fafd4d75ce7e5
NativeFormatImporter:
userData:

View File

@@ -0,0 +1,53 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Ship
serializedVersion: 2
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 3
m_Name: Base Layer
m_StateMachine: {fileID: 110700000}
m_Mask: {fileID: 0}
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_StateMachineMotionSetIndex: 0
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &110200000
State:
m_ObjectHideFlags: 3
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Ship
m_Speed: 1
m_CycleOffset: 0
m_Motions:
- {fileID: 7400000, guid: e11f893ed7c0f4cfeb3fafd4d75ce7e5, type: 2}
m_ParentStateMachine: {fileID: 110700000}
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_Mirror: 0
m_Tag:
--- !u!1107 &110700000
StateMachine:
serializedVersion: 2
m_ObjectHideFlags: 3
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Base Layer
m_DefaultState: {fileID: 110200000}
m_States:
- {fileID: 110200000}
m_ChildStateMachine: []
m_ChildStateMachinePosition: []
m_OrderedTransitions: {}
m_MotionSetCount: 1
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: a304d05fd893d4005ae3b59ef5ca8abb
NativeFormatImporter:
userData:

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

View File

@@ -0,0 +1,45 @@
fileFormatVersion: 2
guid: e6f8288974c664a309d6c66de636978c
TextureImporter:
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 2
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 512
textureSettings:
filterMode: 1
aniso: 1
mipBias: 0
wrapMode: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: 0
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

View File

@@ -0,0 +1,27 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 3
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: WaterPlane
m_Shader: {fileID: 30, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: []
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 2800000, guid: e6f8288974c664a309d6c66de636978c, type: 3}
m_Scale: {x: 50, y: 50}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: .286274523}

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 40e9cd3d557264fc49df68fe87fe6bdd
NativeFormatImporter:
userData:

View File

@@ -0,0 +1,91 @@
fileFormatVersion: 2
guid: 7c600eaf3f82d413b82711b6050e8cae
ModelImporter:
serializedVersion: 15
fileIDToRecycleName:
100000: //RootNode
100002: Camera
100004: Cube
100006: Cylinder
100008: Cylinder_001
100010: Cylinder_002
100012: Lamp
400000: //RootNode
400002: Camera
400004: Cube
400006: Cylinder
400008: Cylinder_001
400010: Cylinder_002
400012: Lamp
2300000: //RootNode
2300002: Cube
2300004: Cylinder
2300006: Cylinder_001
2300008: Cylinder_002
3300000: //RootNode
3300002: Cube
3300004: Cylinder
3300006: Cylinder_001
3300008: Cylinder_002
4300000: Cylinder_002
4300002: Cylinder_001
4300004: Cylinder
4300006: Cube
6400000: Cube
6400002: Cylinder
6400004: Cylinder_001
6400006: Cylinder_002
7400000: Default Take
9500000: //RootNode
materials:
importMaterials: 0
materialName: 0
materialSearch: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
optimizeGameObjects: 0
animationCompression: 1
animationRotationError: .5
animationPositionError: .5
animationScaleError: .5
animationWrapMode: 0
extraExposedTransformPaths: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 1
importBlendShapes: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
weldVertices: 1
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
tangentSpace:
normalSmoothAngle: 60
splitTangentsAcrossUV: 1
normalImportMode: 1
tangentImportMode: 1
importAnimation: 1
copyAvatar: 0
humanDescription:
human: []
skeleton: []
armTwist: .5
foreArmTwist: .5
upperLegTwist: .5
legTwist: .5
armStretch: .0500000007
legStretch: .0500000007
feetSpacing: 0
rootMotionBoneName:
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 0
userData:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: e164cbfc1a1e94a558c433a54cff2645
folderAsset: yes
timeCreated: 1453724257
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: d53ddd1468b914daf9b82ad30ea1f8b6
folderAsset: yes
timeCreated: 1453724282
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,119 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Door
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 110722164}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &110239538
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 3
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: close
m_Speed: -1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7400000, guid: 27f485081874343ec9646d443c79af4e, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &110269024
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: open
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7400000, guid: 27f485081874343ec9646d443c79af4e, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &110280144
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: blocked
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7400000, guid: db9b9289ebef24e71a6f303a59884985, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1107 &110722164
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 110269024}
m_Position: {x: 276, y: 12, z: 0}
- serializedVersion: 1
m_State: {fileID: 110239538}
m_Position: {x: 288, y: 156, z: 0}
- serializedVersion: 1
m_State: {fileID: 110280144}
m_Position: {x: 276, y: 240, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 110239538}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1528fd46e6d314ad381d6f0c072caa33
timeCreated: 1453724282
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,119 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Red
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 110729212}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &110252372
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 3
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: hide
m_Speed: -1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7400000, guid: 66c93f14e4d21416eb0774bf83c05bdc, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &110257406
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: show
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7400000, guid: 66c93f14e4d21416eb0774bf83c05bdc, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &110263680
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: hidden
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7400000, guid: 4cfd409a0af9b48e9983ca5608b62e95, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1107 &110729212
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 110257406}
m_Position: {x: 252, y: -12, z: 0}
- serializedVersion: 1
m_State: {fileID: 110252372}
m_Position: {x: 288, y: 96, z: 0}
- serializedVersion: 1
m_State: {fileID: 110263680}
m_Position: {x: 323, y: 161, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 110263680}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4bdf4f8f9f4d24739b8f01d064e9ff15
timeCreated: 1453734781
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,266 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: hexagon_button_hidden
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: {x: .707106829, y: 0, z: 0, w: .707106709}
inSlope: {x: 0, y: 0, z: 0, w: 0}
outSlope: {x: 0, y: 0, z: 0, w: 0}
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
path: Canvas/Button
m_CompressedRotationCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: -1
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_AnchoredPosition.y
path: Canvas/Button
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_Enabled
path: Canvas
classID: 114
script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_Enabled
path: Canvas
classID: 223
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- path: 2721278254
attribute: 3305885265
script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
classID: 114
customType: 24
isPPtrCurve: 0
- path: 2721278254
attribute: 3305885265
script: {fileID: 0}
classID: 223
customType: 0
isPPtrCurve: 0
- path: 2573963560
attribute: 2
script: {fileID: 0}
classID: 4
customType: 0
isPPtrCurve: 0
- path: 2573963560
attribute: 538195251
script: {fileID: 0}
classID: 224
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_StartTime: 0
m_StopTime: 0
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: .707106829
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalRotation.x
path: Canvas/Button
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalRotation.y
path: Canvas/Button
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalRotation.z
path: Canvas/Button
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: .707106709
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalRotation.w
path: Canvas/Button
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: -1
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_AnchoredPosition.y
path: Canvas/Button
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_Enabled
path: Canvas
classID: 114
script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_Enabled
path: Canvas
classID: 223
script: {fileID: 0}
m_EulerEditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 90
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: localEulerAnglesBaked.x
path: Canvas/Button
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: localEulerAnglesBaked.y
path: Canvas/Button
classID: 224
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: localEulerAnglesBaked.z
path: Canvas/Button
classID: 224
script: {fileID: 0}
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4cfd409a0af9b48e9983ca5608b62e95
timeCreated: 1453735112
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 66c93f14e4d21416eb0774bf83c05bdc
timeCreated: 1453734781
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,483 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: hexagon_door_blocked
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_PositionCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: {x: 0, y: -.479999989, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
path: Mesh (5)
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: {x: 0, y: -.479999989, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
path: Mesh (4)
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: {x: 0, y: -.479999989, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
path: Mesh (3)
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: {x: 0, y: -.479999989, z: 0}
inSlope: {x: 0, y: .144000009, z: 0}
outSlope: {x: 0, y: .144000009, z: 0}
tangentMode: 0
- time: .416666657
value: {x: 0, y: -.419999987, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
- time: .833333313
value: {x: 0, y: -.479999989, z: 0}
inSlope: {x: 0, y: -.144000009, z: 0}
outSlope: {x: 0, y: -.144000009, z: 0}
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
path: Mesh (2)
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: {x: 0, y: -.479999989, z: 0}
inSlope: {x: 0, y: .24000001, z: 0}
outSlope: {x: 0, y: .24000001, z: 0}
tangentMode: 0
- time: .25
value: {x: 0, y: -.419999987, z: 0}
inSlope: {x: 0, y: .0299999937, z: 0}
outSlope: {x: 0, y: .0299999937, z: 0}
tangentMode: 0
- time: .583333313
value: {x: 0, y: -.479999989, z: 0}
inSlope: {x: 0, y: -.180000022, z: 0}
outSlope: {x: 0, y: -.180000022, z: 0}
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
path: Mesh (1)
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: {x: 0, y: -.479999989, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
path: Mesh
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- path: 325999759
attribute: 1
script: {fileID: 0}
classID: 4
customType: 0
isPPtrCurve: 0
- path: 943918924
attribute: 1
script: {fileID: 0}
classID: 4
customType: 0
isPPtrCurve: 0
- path: 1546635848
attribute: 1
script: {fileID: 0}
classID: 4
customType: 0
isPPtrCurve: 0
- path: 1161100041
attribute: 1
script: {fileID: 0}
classID: 4
customType: 0
isPPtrCurve: 0
- path: 175467982
attribute: 1
script: {fileID: 0}
classID: 4
customType: 0
isPPtrCurve: 0
- path: 1096652136
attribute: 1
script: {fileID: 0}
classID: 4
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_StartTime: 0
m_StopTime: .833333313
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.x
path: Mesh (5)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: -.479999989
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.y
path: Mesh (5)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.z
path: Mesh (5)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.x
path: Mesh (4)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: -.479999989
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.y
path: Mesh (4)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.z
path: Mesh (4)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.x
path: Mesh (3)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: -.479999989
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.y
path: Mesh (3)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.z
path: Mesh (3)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .416666657
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .833333313
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.x
path: Mesh (2)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: -.479999989
inSlope: .144000009
outSlope: .144000009
tangentMode: 10
- time: .416666657
value: -.419999987
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .833333313
value: -.479999989
inSlope: -.144000009
outSlope: -.144000009
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.y
path: Mesh (2)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .416666657
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .833333313
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.z
path: Mesh (2)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .25
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .583333313
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.x
path: Mesh (1)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: -.479999989
inSlope: .24000001
outSlope: .24000001
tangentMode: 10
- time: .25
value: -.419999987
inSlope: .0299999937
outSlope: .0299999937
tangentMode: 10
- time: .583333313
value: -.479999989
inSlope: -.180000022
outSlope: -.180000022
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.y
path: Mesh (1)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .25
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .583333313
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.z
path: Mesh (1)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.x
path: Mesh
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: -.479999989
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.y
path: Mesh
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.z
path: Mesh
classID: 4
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: db9b9289ebef24e71a6f303a59884985
timeCreated: 1453727230
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,623 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: hexagon_door_open
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_PositionCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
- time: .583333313
value: {x: 0, y: -.479999989, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
path: Mesh
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
- time: .166666672
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: -.479999989, z: 0}
outSlope: {x: 0, y: -.479999989, z: 0}
tangentMode: 0
- time: .666666687
value: {x: 0, y: -.479999989, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
path: Mesh (1)
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
- time: .25
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: -.479999989, z: 0}
outSlope: {x: 0, y: -.479999989, z: 0}
tangentMode: 0
- time: .75
value: {x: 0, y: -.479999989, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
path: Mesh (2)
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
- time: .333333343
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: -.480000019, z: 0}
outSlope: {x: 0, y: -.480000019, z: 0}
tangentMode: 0
- time: .833333313
value: {x: 0, y: -.479999989, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
path: Mesh (3)
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
- time: .416666657
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: -.479999989, z: 0}
outSlope: {x: 0, y: -.479999989, z: 0}
tangentMode: 0
- time: .916666687
value: {x: 0, y: -.479999989, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
path: Mesh (4)
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
- time: .5
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: -.479999989, z: 0}
outSlope: {x: 0, y: -.479999989, z: 0}
tangentMode: 0
- time: 1
value: {x: 0, y: -.479999989, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
path: Mesh (5)
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- path: 1096652136
attribute: 1
script: {fileID: 0}
classID: 4
customType: 0
isPPtrCurve: 0
- path: 943918924
attribute: 1
script: {fileID: 0}
classID: 4
customType: 0
isPPtrCurve: 0
- path: 325999759
attribute: 1
script: {fileID: 0}
classID: 4
customType: 0
isPPtrCurve: 0
- path: 175467982
attribute: 1
script: {fileID: 0}
classID: 4
customType: 0
isPPtrCurve: 0
- path: 1161100041
attribute: 1
script: {fileID: 0}
classID: 4
customType: 0
isPPtrCurve: 0
- path: 1546635848
attribute: 1
script: {fileID: 0}
classID: 4
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_StartTime: 0
m_StopTime: 1
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .583333313
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.x
path: Mesh
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: .583333313
value: -.479999989
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.y
path: Mesh
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .583333313
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.z
path: Mesh
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .166666672
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .666666687
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.x
path: Mesh (1)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .166666672
value: 0
inSlope: -.479999989
outSlope: -.479999989
tangentMode: 10
- time: .666666687
value: -.479999989
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.y
path: Mesh (1)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .166666672
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .666666687
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.z
path: Mesh (1)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .25
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .75
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.x
path: Mesh (2)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .25
value: 0
inSlope: -.479999989
outSlope: -.479999989
tangentMode: 10
- time: .75
value: -.479999989
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.y
path: Mesh (2)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .25
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .75
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.z
path: Mesh (2)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .333333343
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .833333313
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.x
path: Mesh (3)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .333333343
value: 0
inSlope: -.480000019
outSlope: -.480000019
tangentMode: 10
- time: .833333313
value: -.479999989
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.y
path: Mesh (3)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .333333343
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .833333313
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.z
path: Mesh (3)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .416666657
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .916666687
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.x
path: Mesh (4)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .416666657
value: 0
inSlope: -.479999989
outSlope: -.479999989
tangentMode: 10
- time: .916666687
value: -.479999989
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.y
path: Mesh (4)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .416666657
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .916666687
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.z
path: Mesh (4)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .5
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.x
path: Mesh (5)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .5
value: 0
inSlope: -.479999989
outSlope: -.479999989
tangentMode: 10
- time: 1
value: -.479999989
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.y
path: Mesh (5)
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: .5
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
- time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 10
m_PreInfinity: 2
m_PostInfinity: 2
attribute: m_LocalPosition.z
path: Mesh (5)
classID: 4
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 27f485081874343ec9646d443c79af4e
timeCreated: 1453724282
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
using UnityEngine;
using System.Collections;
namespace Pathfinding.Examples {
/// <summary>Helper script in the example scene 'Turn Based'</summary>
[HelpURL("https://arongranberg.com/astar/documentation/stable/class_pathfinding_1_1_examples_1_1_astar3_d_button.php")]
public class Astar3DButton : MonoBehaviour {
public GraphNode node;
public void OnHover (bool hover) {
// TODO: Play animation
}
public void OnClick () {
// TODO: Play animation
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 8bdafa1bb4d574966b14ed3f69dca5e9
timeCreated: 1453644610
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,38 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
namespace Pathfinding.Examples {
/// <summary>Helper script in the example scene 'Turn Based'</summary>
[RequireComponent(typeof(Animator))]
[HelpURL("https://arongranberg.com/astar/documentation/stable/class_pathfinding_1_1_examples_1_1_hexagon_trigger.php")]
public class HexagonTrigger : MonoBehaviour {
public Button button;
Animator anim;
bool visible;
void Awake () {
anim = GetComponent<Animator>();
button.interactable = false;
}
void OnTriggerEnter (Collider coll) {
var unit = coll.GetComponentInParent<TurnBasedAI>();
var node = AstarPath.active.GetNearest(transform.position).node;
// Check if it was a unit and the unit was headed for this node
if (unit != null && unit.targetNode == node) {
button.interactable = true;
visible = true;
anim.CrossFade("show", 0.1f);
}
}
void OnTriggerExit (Collider coll) {
if (coll.GetComponentInParent<TurnBasedAI>() != null && visible) {
button.interactable = false;
anim.CrossFade("hide", 0.1f);
}
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 37801f8edc1e3434d9d759f1aaeedb15
timeCreated: 1453730197
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 9832580cbcb3f4f7d9f0c0d15f15ec4f
folderAsset: yes
timeCreated: 1453726461
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,138 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: hexagon_blue
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _SrcBlend
second: 1
data:
first:
name: _DstBlend
second: 0
data:
first:
name: _Cutoff
second: .5
data:
first:
name: _Parallax
second: .0199999996
data:
first:
name: _ZWrite
second: 1
data:
first:
name: _Glossiness
second: .5
data:
first:
name: _BumpScale
second: 1
data:
first:
name: _OcclusionStrength
second: 1
data:
first:
name: _DetailNormalMapScale
second: 1
data:
first:
name: _UVSec
second: 0
data:
first:
name: _Mode
second: 0
data:
first:
name: _Metallic
second: 0
m_Colors:
data:
first:
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}
data:
first:
name: _Color
second: {r: .254541546, g: .588557303, b: .786764741, a: 1}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8212b5aa1578c4cb58a87d707466d8c5
timeCreated: 1453726470
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,138 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: hexagon_green
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _SrcBlend
second: 1
data:
first:
name: _DstBlend
second: 0
data:
first:
name: _Cutoff
second: .5
data:
first:
name: _Parallax
second: .0199999996
data:
first:
name: _ZWrite
second: 1
data:
first:
name: _Glossiness
second: .5
data:
first:
name: _BumpScale
second: 1
data:
first:
name: _OcclusionStrength
second: 1
data:
first:
name: _DetailNormalMapScale
second: 1
data:
first:
name: _UVSec
second: 0
data:
first:
name: _Mode
second: 0
data:
first:
name: _Metallic
second: 0
m_Colors:
data:
first:
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}
data:
first:
name: _Color
second: {r: .340960145, g: .811764717, b: .278431416, a: 1}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 57eb4c059e0b3467cac0a46a3b859a2d
timeCreated: 1453726625
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,138 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: hexagon_purple
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _SrcBlend
second: 1
data:
first:
name: _DstBlend
second: 0
data:
first:
name: _Cutoff
second: .5
data:
first:
name: _Parallax
second: .0199999996
data:
first:
name: _ZWrite
second: 1
data:
first:
name: _Glossiness
second: .5
data:
first:
name: _BumpScale
second: 1
data:
first:
name: _OcclusionStrength
second: 1
data:
first:
name: _DetailNormalMapScale
second: 1
data:
first:
name: _UVSec
second: 0
data:
first:
name: _Mode
second: 0
data:
first:
name: _Metallic
second: 0
m_Colors:
data:
first:
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}
data:
first:
name: _Color
second: {r: .539581001, g: .278431416, b: .811764717, a: 1}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8e2768ddb13a540bd8d88bcbe4217c52
timeCreated: 1453731362
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,138 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: hexagon_red
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _SrcBlend
second: 1
data:
first:
name: _DstBlend
second: 0
data:
first:
name: _Cutoff
second: .5
data:
first:
name: _Parallax
second: .0199999996
data:
first:
name: _ZWrite
second: 1
data:
first:
name: _Glossiness
second: 0
data:
first:
name: _BumpScale
second: 1
data:
first:
name: _OcclusionStrength
second: 1
data:
first:
name: _DetailNormalMapScale
second: 1
data:
first:
name: _UVSec
second: 0
data:
first:
name: _Mode
second: 0
data:
first:
name: _Metallic
second: 0
m_Colors:
data:
first:
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}
data:
first:
name: _Color
second: {r: .808823526, g: .29141435, b: .29141435, a: 1}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7bee73e48c17f46e2aaae9d51d37c76e
timeCreated: 1453744721
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,138 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: hexagon_yellow
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _SrcBlend
second: 1
data:
first:
name: _DstBlend
second: 0
data:
first:
name: _Cutoff
second: .5
data:
first:
name: _Parallax
second: .0199999996
data:
first:
name: _ZWrite
second: 1
data:
first:
name: _Glossiness
second: .150999993
data:
first:
name: _BumpScale
second: 1
data:
first:
name: _OcclusionStrength
second: 1
data:
first:
name: _DetailNormalMapScale
second: 1
data:
first:
name: _UVSec
second: 0
data:
first:
name: _Mode
second: 0
data:
first:
name: _Metallic
second: 0
m_Colors:
data:
first:
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}
data:
first:
name: _Color
second: {r: .779411793, g: .738939285, b: .412629783, a: .546999991}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9ba9977b50fa84a2ba9914d456e83021
timeCreated: 1453726848
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,139 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: hexagon_yellow_transparent
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON
m_LightmapFlags: 5
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _SrcBlend
second: 1
data:
first:
name: _DstBlend
second: 10
data:
first:
name: _Cutoff
second: .5
data:
first:
name: _Parallax
second: .0199999996
data:
first:
name: _ZWrite
second: 0
data:
first:
name: _Glossiness
second: .5
data:
first:
name: _BumpScale
second: 1
data:
first:
name: _OcclusionStrength
second: 1
data:
first:
name: _DetailNormalMapScale
second: 1
data:
first:
name: _UVSec
second: 0
data:
first:
name: _Mode
second: 3
data:
first:
name: _Metallic
second: 0
m_Colors:
data:
first:
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}
data:
first:
name: _Color
second: {r: 1, g: .972413778, b: 0, a: .303000003}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4a841379f95184707bbe90553d537f88
timeCreated: 1453732413
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 73f684c2eb6464105a4a4dff331755f7
folderAsset: yes
timeCreated: 1453734259
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,91 @@
fileFormatVersion: 2
guid: 41c347312297e4b149a2c7d4a1038bee
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 16
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,72 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace Pathfinding.Examples {
/// <summary>Helper script in the example scene 'Turn Based'</summary>
[RequireComponent(typeof(Animator))]
[RequireComponent(typeof(SingleNodeBlocker))]
[HelpURL("https://arongranberg.com/astar/documentation/stable/class_pathfinding_1_1_examples_1_1_turn_based_door.php")]
public class TurnBasedDoor : MonoBehaviour {
Animator animator;
SingleNodeBlocker blocker;
bool open;
void Awake () {
animator = GetComponent<Animator>();
blocker = GetComponent<SingleNodeBlocker>();
}
void Start () {
// Make sure the door starts out blocked
blocker.BlockAtCurrentPosition();
animator.CrossFade("close", 0.2f);
}
public void Close () {
StartCoroutine(WaitAndClose());
}
IEnumerator WaitAndClose () {
var selector = new List<SingleNodeBlocker>() { blocker };
var node = AstarPath.active.GetNearest(transform.position).node;
// Wait while there is another SingleNodeBlocker occupying the same node as the door
// this is likely another unit which is standing on the door node, and then we cannot
// close the door
if (blocker.manager.NodeContainsAnyExcept(node, selector)) {
// Door is blocked
animator.CrossFade("blocked", 0.2f);
}
while (blocker.manager.NodeContainsAnyExcept(node, selector)) {
yield return null;
}
open = false;
animator.CrossFade("close", 0.2f);
blocker.BlockAtCurrentPosition();
}
public void Open () {
// Stop WaitAndClose if it is running
StopAllCoroutines();
// Play the open door animation
animator.CrossFade("open", 0.2f);
open = true;
// Unblock the door node so that units can traverse it again
blocker.Unblock();
}
public void Toggle () {
if (open) {
Close();
} else {
Open();
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More