parent
2ff2da5682
commit
e1079f2920
File diff suppressed because it is too large
Load Diff
176
BlueWater/Assets/02.Scripts/Boid.cs
Normal file
176
BlueWater/Assets/02.Scripts/Boid.cs
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using Sirenix.OdinInspector;
|
||||||
|
using UnityEngine;
|
||||||
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
|
// ReSharper disable once CheckNamespace
|
||||||
|
namespace BlueWaterProject
|
||||||
|
{
|
||||||
|
public class Boid : MonoBehaviour
|
||||||
|
{
|
||||||
|
[Title("개체 설정")]
|
||||||
|
[SerializeField] private float obstacleDistance = 10;
|
||||||
|
[SerializeField] private float viewAngle = 120;
|
||||||
|
[SerializeField] private int maxNeighbourCount = 10;
|
||||||
|
[SerializeField] private float neighbourDistance = 6;
|
||||||
|
|
||||||
|
[Title("ETC")]
|
||||||
|
[SerializeField] private LayerMask boidUnitLayer;
|
||||||
|
[SerializeField] private LayerMask obstacleLayer;
|
||||||
|
|
||||||
|
private Boids myBoids;
|
||||||
|
private List<Boid> neighbours = new();
|
||||||
|
private Collider[] hitColliders;
|
||||||
|
|
||||||
|
private Coroutine findNeighbourCoroutine;
|
||||||
|
private Coroutine calculateEgoVectorCoroutine;
|
||||||
|
private Vector3 targetPos;
|
||||||
|
private Vector3 egoVector;
|
||||||
|
private float moveSpeed;
|
||||||
|
private float additionalSpeed = 0;
|
||||||
|
|
||||||
|
public void Init(Boids boids, float speed)
|
||||||
|
{
|
||||||
|
myBoids = boids;
|
||||||
|
moveSpeed = speed;
|
||||||
|
hitColliders = new Collider[maxNeighbourCount];
|
||||||
|
|
||||||
|
findNeighbourCoroutine = StartCoroutine("FindNeighbourCoroutine");
|
||||||
|
calculateEgoVectorCoroutine = StartCoroutine("CalculateEgoVectorCoroutine");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDrawGizmosSelected()
|
||||||
|
{
|
||||||
|
foreach (var neighbour in neighbours)
|
||||||
|
{
|
||||||
|
var myPos = transform.position;
|
||||||
|
|
||||||
|
Gizmos.color = Color.red;
|
||||||
|
Gizmos.DrawLine(myPos, neighbour.transform.position);
|
||||||
|
Gizmos.color = Color.blue;
|
||||||
|
Gizmos.DrawLine(myPos, myPos + targetPos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (additionalSpeed > 0)
|
||||||
|
additionalSpeed -= Time.deltaTime;
|
||||||
|
|
||||||
|
var cohesionPos = CalculateCohesionPos() * myBoids.CohesionWeight;
|
||||||
|
var alignmentPos = CalculateAlignmentPos() * myBoids.AlignmentWeight;
|
||||||
|
var separationPos = CalculateSeparationPos() * myBoids.SeparationWeight;
|
||||||
|
var boundsPos = CalculateBoundsVector() * myBoids.BoundsWeight;
|
||||||
|
var obstaclePos = CalculateObstacleVector() * myBoids.ObstacleWeight;
|
||||||
|
var egoPos = egoVector * myBoids.EgoWeight;
|
||||||
|
|
||||||
|
targetPos = cohesionPos + alignmentPos + separationPos + boundsPos + obstaclePos + egoPos;
|
||||||
|
|
||||||
|
targetPos = Vector3.Lerp(transform.forward, targetPos, Time.deltaTime);
|
||||||
|
targetPos = targetPos.normalized;
|
||||||
|
|
||||||
|
if (targetPos == Vector3.zero)
|
||||||
|
targetPos = egoVector;
|
||||||
|
|
||||||
|
transform.rotation = Quaternion.LookRotation(targetPos);
|
||||||
|
transform.position += targetPos * ((moveSpeed + additionalSpeed) * Time.deltaTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator CalculateEgoVectorCoroutine()
|
||||||
|
{
|
||||||
|
moveSpeed = Random.Range(myBoids.RandomSpeedRange.x, myBoids.RandomSpeedRange.y);
|
||||||
|
egoVector = Random.insideUnitSphere;
|
||||||
|
yield return new WaitForSeconds(Random.Range(1, 3f));
|
||||||
|
calculateEgoVectorCoroutine = StartCoroutine("CalculateEgoVectorCoroutine");
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator FindNeighbourCoroutine()
|
||||||
|
{
|
||||||
|
neighbours.Clear();
|
||||||
|
|
||||||
|
var size = Physics.OverlapSphereNonAlloc(transform.position, neighbourDistance, hitColliders, boidUnitLayer);
|
||||||
|
for (var i = 0; i < size; i++)
|
||||||
|
{
|
||||||
|
if (Vector3.Angle(transform.forward, hitColliders[i].transform.position - transform.position) <= viewAngle)
|
||||||
|
{
|
||||||
|
neighbours.Add(hitColliders[i].GetComponent<Boid>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
yield return new WaitForSeconds(Random.Range(0.5f, 2f));
|
||||||
|
findNeighbourCoroutine = StartCoroutine("FindNeighbourCoroutine");
|
||||||
|
}
|
||||||
|
|
||||||
|
private Vector3 CalculateCohesionPos()
|
||||||
|
{
|
||||||
|
var cohesionPos = Vector3.zero;
|
||||||
|
if (neighbours.Count > 0)
|
||||||
|
{
|
||||||
|
cohesionPos = neighbours.Aggregate(cohesionPos, (current, neighbour) => current + neighbour.transform.position);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return cohesionPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
cohesionPos /= neighbours.Count;
|
||||||
|
cohesionPos -= transform.position;
|
||||||
|
cohesionPos.Normalize();
|
||||||
|
return cohesionPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Vector3 CalculateAlignmentPos()
|
||||||
|
{
|
||||||
|
var alignmentPos = transform.forward;
|
||||||
|
if (neighbours.Count > 0)
|
||||||
|
{
|
||||||
|
alignmentPos = neighbours.Aggregate(alignmentPos, (current, neighbour) => current + neighbour.transform.forward);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return alignmentPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
alignmentPos /= neighbours.Count;
|
||||||
|
alignmentPos.Normalize();
|
||||||
|
return alignmentPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Vector3 CalculateSeparationPos()
|
||||||
|
{
|
||||||
|
var separationPos = Vector3.zero;
|
||||||
|
if (neighbours.Count > 0)
|
||||||
|
{
|
||||||
|
separationPos = neighbours.Aggregate(separationPos, (current, neighbour) => current + (transform.position - neighbour.transform.position));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return separationPos;
|
||||||
|
}
|
||||||
|
separationPos /= neighbours.Count;
|
||||||
|
separationPos.Normalize();
|
||||||
|
return separationPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Vector3 CalculateBoundsVector()
|
||||||
|
{
|
||||||
|
var myPos = transform.position;
|
||||||
|
var offsetToCenter = myBoids.BoundMeshRenderer.transform.position - myPos;
|
||||||
|
var insideBounds = myBoids.BoundMeshRenderer.bounds.Contains(myPos);
|
||||||
|
return insideBounds ? Vector3.zero : offsetToCenter.normalized;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Vector3 CalculateObstacleVector()
|
||||||
|
{
|
||||||
|
var obstaclePos = Vector3.zero;
|
||||||
|
if (Physics.Raycast(transform.position,transform.forward, out var hit, obstacleDistance, obstacleLayer))
|
||||||
|
{
|
||||||
|
Debug.DrawLine(transform.position, hit.point, Color.black);
|
||||||
|
obstaclePos = hit.normal;
|
||||||
|
additionalSpeed = 10;
|
||||||
|
}
|
||||||
|
return obstaclePos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
BlueWater/Assets/02.Scripts/Boid.cs.meta
Normal file
11
BlueWater/Assets/02.Scripts/Boid.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b5a4bdb4c510d354687a785c3f642878
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
82
BlueWater/Assets/02.Scripts/Boids.cs
Normal file
82
BlueWater/Assets/02.Scripts/Boids.cs
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
using Sirenix.OdinInspector;
|
||||||
|
using UnityEngine;
|
||||||
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
|
// ReSharper disable once CheckNamespace
|
||||||
|
namespace BlueWaterProject
|
||||||
|
{
|
||||||
|
public class Boids : MonoBehaviour
|
||||||
|
{
|
||||||
|
[Title("군집(떼) 설정")]
|
||||||
|
[Tooltip("Boid 프리팹")]
|
||||||
|
[SerializeField] private Boid boidPrefab;
|
||||||
|
|
||||||
|
[Range(1, 1000)]
|
||||||
|
[Tooltip("생성할 개체 수")]
|
||||||
|
[SerializeField] private int boidCount = 5;
|
||||||
|
|
||||||
|
[Range(5, 100)]
|
||||||
|
[Tooltip("개체 생성 범위")]
|
||||||
|
[SerializeField] private float spawnRange = 10;
|
||||||
|
|
||||||
|
[field: Tooltip("개체의 랜덤 속도 값\nx == Min\ny == Max")]
|
||||||
|
[field: SerializeField] public Vector2 RandomSpeedRange { get; private set; } = new(5, 10);
|
||||||
|
|
||||||
|
[field: Range(0, 10)]
|
||||||
|
[field: Tooltip("응집력 가중치")]
|
||||||
|
[field: SerializeField] public float CohesionWeight { get; private set; } = 1;
|
||||||
|
|
||||||
|
[field: Range(0, 10)]
|
||||||
|
[field: Tooltip("정렬 가중치")]
|
||||||
|
[field: SerializeField] public float AlignmentWeight { get; private set; } = 1;
|
||||||
|
|
||||||
|
[field: Range(0, 10)]
|
||||||
|
[field: Tooltip("분리 가중치")]
|
||||||
|
[field: SerializeField] public float SeparationWeight { get; private set; } = 1;
|
||||||
|
|
||||||
|
[field: Range(0, 100)]
|
||||||
|
[field: Tooltip("경계 가중치")]
|
||||||
|
[field: SerializeField] public float BoundsWeight { get; private set; } = 1;
|
||||||
|
|
||||||
|
[field: Range(0, 100)]
|
||||||
|
[field: Tooltip("장애물 가중치")]
|
||||||
|
[field: SerializeField] public float ObstacleWeight { get; private set; } = 10;
|
||||||
|
|
||||||
|
[field: Range(0, 10)]
|
||||||
|
[field: Tooltip("자아 가중치")]
|
||||||
|
[field: SerializeField] public float EgoWeight { get; private set; } = 1;
|
||||||
|
|
||||||
|
[Title("옵션")]
|
||||||
|
[Tooltip("경계 범위 On/Off")]
|
||||||
|
[SerializeField] private bool showBounds;
|
||||||
|
|
||||||
|
public MeshRenderer BoundMeshRenderer { get; private set; }
|
||||||
|
|
||||||
|
private void OnValidate()
|
||||||
|
{
|
||||||
|
if (BoundMeshRenderer)
|
||||||
|
{
|
||||||
|
BoundMeshRenderer.enabled = showBounds;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
CreateBoids();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CreateBoids()
|
||||||
|
{
|
||||||
|
BoundMeshRenderer = GetComponentInChildren<MeshRenderer>();
|
||||||
|
BoundMeshRenderer.enabled = showBounds;
|
||||||
|
var myTransform = transform;
|
||||||
|
for (var i = 0; i < boidCount; i++)
|
||||||
|
{
|
||||||
|
var randomPos = Random.insideUnitSphere * spawnRange;
|
||||||
|
var randomRotation = Quaternion.Euler(0, Random.Range(0, 360f), 0);
|
||||||
|
var boid = Instantiate(boidPrefab, myTransform.position + randomPos, randomRotation, myTransform);
|
||||||
|
boid.Init(this, Random.Range(RandomSpeedRange.x, RandomSpeedRange.y));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
BlueWater/Assets/02.Scripts/Boids.cs.meta
Normal file
11
BlueWater/Assets/02.Scripts/Boids.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 883eb23bc92adc54eb936343c0d39f0d
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
8
BlueWater/Assets/03.Materials/Boids.meta
Normal file
8
BlueWater/Assets/03.Materials/Boids.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ca0b51fa697cdb344837256a0ab8213f
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
141
BlueWater/Assets/03.Materials/Boids/BoidsBound.mat
Normal file
141
BlueWater/Assets/03.Materials/Boids/BoidsBound.mat
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: BoidsBound
|
||||||
|
m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords:
|
||||||
|
- _ALPHAPREMULTIPLY_ON
|
||||||
|
- _SURFACE_TYPE_TRANSPARENT
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: 3005
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Transparent
|
||||||
|
disabledShaderPasses:
|
||||||
|
- DepthOnly
|
||||||
|
- SHADOWCASTER
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 10
|
||||||
|
- _DstBlendAlpha: 10
|
||||||
|
- _EnvironmentReflections: 0
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossinessSource: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _Metallic: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueOffset: 5
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Shininess: 0
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessSource: 0
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecSource: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 1
|
||||||
|
- _WorkflowMode: 0
|
||||||
|
- _ZWrite: 0
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.5882353, g: 0, b: 1, a: 0.39215687}
|
||||||
|
- _Color: {r: 0.5882353, g: 0, b: 1, a: 0.39215687}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
--- !u!114 &3534396804740514
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 7
|
8
BlueWater/Assets/03.Materials/Boids/BoidsBound.mat.meta
Normal file
8
BlueWater/Assets/03.Materials/Boids/BoidsBound.mat.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 51923919e8fc7874293ddd0ec8b4f352
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
146
BlueWater/Assets/03.Materials/Boids/Fish01.mat
Normal file
146
BlueWater/Assets/03.Materials/Boids/Fish01.mat
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-7508768530177104492
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 7
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Fish01
|
||||||
|
m_Shader: {fileID: 4800000, guid: 8b0bcba1cce78b64f84471735e786188, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords: []
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 2800000, guid: b22e9f06f1fbc294c9cb94024e1e05ea, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _AmplitudeX: 0.05
|
||||||
|
- _AmplitudeY: 0.05
|
||||||
|
- _AmplitudeZ: 0.1
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _FrequencyX: 10
|
||||||
|
- _FrequencyY: 5
|
||||||
|
- _FrequencyZ: 10
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossinessSource: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _HeadLimit: 0
|
||||||
|
- _Metallic: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Shininess: 0
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessSource: 0
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecSource: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SpeedX: 1
|
||||||
|
- _SpeedY: 0
|
||||||
|
- _SpeedZ: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
8
BlueWater/Assets/03.Materials/Boids/Fish01.mat.meta
Normal file
8
BlueWater/Assets/03.Materials/Boids/Fish01.mat.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 092a095eda8f69f4cabbac57bae2184f
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
153
BlueWater/Assets/03.Materials/Boids/FishGraph.mat
Normal file
153
BlueWater/Assets/03.Materials/Boids/FishGraph.mat
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: FishGraph
|
||||||
|
m_Shader: {fileID: -6465566751694194690, guid: 7cae0496bda14c04a9d5aa9138f04bda,
|
||||||
|
type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords: []
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 1
|
||||||
|
m_CustomRenderQueue: 2050
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 2800000, guid: b22e9f06f1fbc294c9cb94024e1e05ea, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 2800000, guid: b22e9f06f1fbc294c9cb94024e1e05ea, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _AmplitudeX: 0.2
|
||||||
|
- _AmplitudeX_1: 0.2
|
||||||
|
- _AmplitudeX_2: 0.2
|
||||||
|
- _AmplitudeX_3: 0.2
|
||||||
|
- _AmplitudeY: 0.2
|
||||||
|
- _AmplitudeZ: 1
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BlendOp: 0
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 0
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _FrequencyX: 1
|
||||||
|
- _FrequencyX_1: 1
|
||||||
|
- _FrequencyX_2: 1
|
||||||
|
- _FrequencyX_3: 1
|
||||||
|
- _FrequencyX_4: 1
|
||||||
|
- _FrequencyY: 1
|
||||||
|
- _FrequencyZ: 1
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _HeadLimit: 0.05
|
||||||
|
- _Metallic: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueControl: 0
|
||||||
|
- _QueueOffset: 50
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _SampleGI: 0
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SpeedX: 1
|
||||||
|
- _SpeedY: 1
|
||||||
|
- _SpeedZ: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
--- !u!114 &6506538637606883820
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 7
|
8
BlueWater/Assets/03.Materials/Boids/FishGraph.mat.meta
Normal file
8
BlueWater/Assets/03.Materials/Boids/FishGraph.mat.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ba438db46799cdc48b7a187f7d42df9e
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
8
BlueWater/Assets/05.Prefabs/Boids.meta
Normal file
8
BlueWater/Assets/05.Prefabs/Boids.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8799617102174054dae56b9d97353376
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
162
BlueWater/Assets/05.Prefabs/Boids/Boid.prefab
Normal file
162
BlueWater/Assets/05.Prefabs/Boids/Boid.prefab
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &665513925588288320
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4874816205509271808}
|
||||||
|
- component: {fileID: 5402562142639805275}
|
||||||
|
- component: {fileID: 2102284208022651341}
|
||||||
|
m_Layer: 15
|
||||||
|
m_Name: Boid
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4874816205509271808
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 665513925588288320}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 4663177917130564317}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &5402562142639805275
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 665513925588288320}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: b5a4bdb4c510d354687a785c3f642878, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
obstacleDistance: 10
|
||||||
|
viewAngle: 120
|
||||||
|
maxNeighbourCount: 10
|
||||||
|
neighbourDistance: 6
|
||||||
|
boidUnitLayer:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
obstacleLayer:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 2097672
|
||||||
|
--- !u!65 &2102284208022651341
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 665513925588288320}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 1, y: 1, z: 4}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &5370122689380285007
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4663177917130564317}
|
||||||
|
- component: {fileID: 1579208819468009085}
|
||||||
|
- component: {fileID: 1238523984028734065}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: VisualLook
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4663177917130564317
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5370122689380285007}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071067}
|
||||||
|
m_LocalPosition: {x: -0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1.9594047}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 4874816205509271808}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &1579208819468009085
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5370122689380285007}
|
||||||
|
m_Mesh: {fileID: 1391105594336295549, guid: 4fcad621167d55148be4bc4c00d7226e, type: 3}
|
||||||
|
--- !u!23 &1238523984028734065
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5370122689380285007}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: ba438db46799cdc48b7a187f7d42df9e, 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: 1
|
||||||
|
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
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
7
BlueWater/Assets/05.Prefabs/Boids/Boid.prefab.meta
Normal file
7
BlueWater/Assets/05.Prefabs/Boids/Boid.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1294b74a61e4faa49a0fb449956b4fda
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
142
BlueWater/Assets/05.Prefabs/Boids/Boids.prefab
Normal file
142
BlueWater/Assets/05.Prefabs/Boids/Boids.prefab
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &2441661978531314766
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2854089398056668840}
|
||||||
|
- component: {fileID: 3243186087995758770}
|
||||||
|
- component: {fileID: 2486807546603369919}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Bounds
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &2854089398056668840
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2441661978531314766}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 30, y: 10, z: 30}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1800824703194841433}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &3243186087995758770
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2441661978531314766}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &2486807546603369919
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2441661978531314766}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 51923919e8fc7874293ddd0ec8b4f352, 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: 1
|
||||||
|
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
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!1 &4541625270423798677
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1800824703194841433}
|
||||||
|
- component: {fileID: 5146900491857106217}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Boids
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1800824703194841433
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4541625270423798677}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: -13.5, y: -13.2, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 1
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 2854089398056668840}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &5146900491857106217
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4541625270423798677}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 883eb23bc92adc54eb936343c0d39f0d, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
boidPrefab: {fileID: 5402562142639805275, guid: 1294b74a61e4faa49a0fb449956b4fda,
|
||||||
|
type: 3}
|
||||||
|
boidCount: 5
|
||||||
|
spawnRange: 10
|
||||||
|
<RandomSpeedRange>k__BackingField: {x: 5, y: 10}
|
||||||
|
<CohesionWeight>k__BackingField: 1.5
|
||||||
|
<AlignmentWeight>k__BackingField: 3
|
||||||
|
<SeparationWeight>k__BackingField: 1
|
||||||
|
<BoundsWeight>k__BackingField: 10
|
||||||
|
<ObstacleWeight>k__BackingField: 10
|
||||||
|
<EgoWeight>k__BackingField: 1
|
||||||
|
showBounds: 1
|
7
BlueWater/Assets/05.Prefabs/Boids/Boids.prefab.meta
Normal file
7
BlueWater/Assets/05.Prefabs/Boids/Boids.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f228040d76c9217409284544f353da47
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
BlueWater/Assets/08.Models/fish.fbx
Normal file
BIN
BlueWater/Assets/08.Models/fish.fbx
Normal file
Binary file not shown.
107
BlueWater/Assets/08.Models/fish.fbx.meta
Normal file
107
BlueWater/Assets/08.Models/fish.fbx.meta
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d8bab48d09fd529438ea0c30410bd858
|
||||||
|
ModelImporter:
|
||||||
|
serializedVersion: 22200
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
materials:
|
||||||
|
materialImportMode: 2
|
||||||
|
materialName: 0
|
||||||
|
materialSearch: 1
|
||||||
|
materialLocation: 1
|
||||||
|
animations:
|
||||||
|
legacyGenerateAnimations: 4
|
||||||
|
bakeSimulation: 0
|
||||||
|
resampleCurves: 1
|
||||||
|
optimizeGameObjects: 0
|
||||||
|
removeConstantScaleCurves: 0
|
||||||
|
motionNodeName:
|
||||||
|
animationImportErrors:
|
||||||
|
animationImportWarnings:
|
||||||
|
animationRetargetingWarnings:
|
||||||
|
animationDoRetargetingWarnings: 0
|
||||||
|
importAnimatedCustomProperties: 0
|
||||||
|
importConstraints: 0
|
||||||
|
animationCompression: 1
|
||||||
|
animationRotationError: 0.5
|
||||||
|
animationPositionError: 0.5
|
||||||
|
animationScaleError: 0.5
|
||||||
|
animationWrapMode: 0
|
||||||
|
extraExposedTransformPaths: []
|
||||||
|
extraUserProperties: []
|
||||||
|
clipAnimations: []
|
||||||
|
isReadable: 0
|
||||||
|
meshes:
|
||||||
|
lODScreenPercentages: []
|
||||||
|
globalScale: 1
|
||||||
|
meshCompression: 0
|
||||||
|
addColliders: 0
|
||||||
|
useSRGBMaterialColor: 1
|
||||||
|
sortHierarchyByName: 1
|
||||||
|
importPhysicalCameras: 1
|
||||||
|
importVisibility: 1
|
||||||
|
importBlendShapes: 1
|
||||||
|
importCameras: 1
|
||||||
|
importLights: 1
|
||||||
|
nodeNameCollisionStrategy: 1
|
||||||
|
fileIdsGeneration: 2
|
||||||
|
swapUVChannels: 0
|
||||||
|
generateSecondaryUV: 0
|
||||||
|
useFileUnits: 1
|
||||||
|
keepQuads: 0
|
||||||
|
weldVertices: 1
|
||||||
|
bakeAxisConversion: 0
|
||||||
|
preserveHierarchy: 0
|
||||||
|
skinWeightsMode: 0
|
||||||
|
maxBonesPerVertex: 4
|
||||||
|
minBoneWeight: 0.001
|
||||||
|
optimizeBones: 1
|
||||||
|
meshOptimizationFlags: -1
|
||||||
|
indexFormat: 0
|
||||||
|
secondaryUVAngleDistortion: 8
|
||||||
|
secondaryUVAreaDistortion: 15.000001
|
||||||
|
secondaryUVHardAngle: 88
|
||||||
|
secondaryUVMarginMethod: 1
|
||||||
|
secondaryUVMinLightmapResolution: 40
|
||||||
|
secondaryUVMinObjectScale: 1
|
||||||
|
secondaryUVPackMargin: 4
|
||||||
|
useFileScale: 1
|
||||||
|
strictVertexDataChecks: 0
|
||||||
|
tangentSpace:
|
||||||
|
normalSmoothAngle: 60
|
||||||
|
normalImportMode: 0
|
||||||
|
tangentImportMode: 3
|
||||||
|
normalCalculationMode: 4
|
||||||
|
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||||
|
blendShapeNormalImportMode: 1
|
||||||
|
normalSmoothingSource: 0
|
||||||
|
referencedClips: []
|
||||||
|
importAnimation: 1
|
||||||
|
humanDescription:
|
||||||
|
serializedVersion: 3
|
||||||
|
human: []
|
||||||
|
skeleton: []
|
||||||
|
armTwist: 0.5
|
||||||
|
foreArmTwist: 0.5
|
||||||
|
upperLegTwist: 0.5
|
||||||
|
legTwist: 0.5
|
||||||
|
armStretch: 0.05
|
||||||
|
legStretch: 0.05
|
||||||
|
feetSpacing: 0
|
||||||
|
globalScale: 1
|
||||||
|
rootMotionBoneName:
|
||||||
|
hasTranslationDoF: 0
|
||||||
|
hasExtraRoot: 0
|
||||||
|
skeletonHasParents: 1
|
||||||
|
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||||
|
autoGenerateAvatarMappingIfUnspecified: 1
|
||||||
|
animationType: 2
|
||||||
|
humanoidOversampling: 1
|
||||||
|
avatarSetup: 0
|
||||||
|
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||||
|
importBlendShapeDeformPercent: 1
|
||||||
|
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||||
|
additionalBone: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
BlueWater/Assets/08.Models/fish01.fbx
Normal file
BIN
BlueWater/Assets/08.Models/fish01.fbx
Normal file
Binary file not shown.
107
BlueWater/Assets/08.Models/fish01.fbx.meta
Normal file
107
BlueWater/Assets/08.Models/fish01.fbx.meta
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4fcad621167d55148be4bc4c00d7226e
|
||||||
|
ModelImporter:
|
||||||
|
serializedVersion: 22200
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
materials:
|
||||||
|
materialImportMode: 2
|
||||||
|
materialName: 0
|
||||||
|
materialSearch: 1
|
||||||
|
materialLocation: 1
|
||||||
|
animations:
|
||||||
|
legacyGenerateAnimations: 4
|
||||||
|
bakeSimulation: 0
|
||||||
|
resampleCurves: 1
|
||||||
|
optimizeGameObjects: 0
|
||||||
|
removeConstantScaleCurves: 0
|
||||||
|
motionNodeName:
|
||||||
|
animationImportErrors:
|
||||||
|
animationImportWarnings:
|
||||||
|
animationRetargetingWarnings:
|
||||||
|
animationDoRetargetingWarnings: 0
|
||||||
|
importAnimatedCustomProperties: 0
|
||||||
|
importConstraints: 0
|
||||||
|
animationCompression: 1
|
||||||
|
animationRotationError: 0.5
|
||||||
|
animationPositionError: 0.5
|
||||||
|
animationScaleError: 0.5
|
||||||
|
animationWrapMode: 0
|
||||||
|
extraExposedTransformPaths: []
|
||||||
|
extraUserProperties: []
|
||||||
|
clipAnimations: []
|
||||||
|
isReadable: 0
|
||||||
|
meshes:
|
||||||
|
lODScreenPercentages: []
|
||||||
|
globalScale: 1
|
||||||
|
meshCompression: 0
|
||||||
|
addColliders: 0
|
||||||
|
useSRGBMaterialColor: 1
|
||||||
|
sortHierarchyByName: 1
|
||||||
|
importPhysicalCameras: 1
|
||||||
|
importVisibility: 1
|
||||||
|
importBlendShapes: 1
|
||||||
|
importCameras: 1
|
||||||
|
importLights: 1
|
||||||
|
nodeNameCollisionStrategy: 1
|
||||||
|
fileIdsGeneration: 2
|
||||||
|
swapUVChannels: 0
|
||||||
|
generateSecondaryUV: 0
|
||||||
|
useFileUnits: 1
|
||||||
|
keepQuads: 0
|
||||||
|
weldVertices: 1
|
||||||
|
bakeAxisConversion: 0
|
||||||
|
preserveHierarchy: 0
|
||||||
|
skinWeightsMode: 0
|
||||||
|
maxBonesPerVertex: 4
|
||||||
|
minBoneWeight: 0.001
|
||||||
|
optimizeBones: 1
|
||||||
|
meshOptimizationFlags: -1
|
||||||
|
indexFormat: 0
|
||||||
|
secondaryUVAngleDistortion: 8
|
||||||
|
secondaryUVAreaDistortion: 15.000001
|
||||||
|
secondaryUVHardAngle: 88
|
||||||
|
secondaryUVMarginMethod: 1
|
||||||
|
secondaryUVMinLightmapResolution: 40
|
||||||
|
secondaryUVMinObjectScale: 1
|
||||||
|
secondaryUVPackMargin: 4
|
||||||
|
useFileScale: 1
|
||||||
|
strictVertexDataChecks: 0
|
||||||
|
tangentSpace:
|
||||||
|
normalSmoothAngle: 60
|
||||||
|
normalImportMode: 0
|
||||||
|
tangentImportMode: 3
|
||||||
|
normalCalculationMode: 4
|
||||||
|
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||||
|
blendShapeNormalImportMode: 1
|
||||||
|
normalSmoothingSource: 0
|
||||||
|
referencedClips: []
|
||||||
|
importAnimation: 1
|
||||||
|
humanDescription:
|
||||||
|
serializedVersion: 3
|
||||||
|
human: []
|
||||||
|
skeleton: []
|
||||||
|
armTwist: 0.5
|
||||||
|
foreArmTwist: 0.5
|
||||||
|
upperLegTwist: 0.5
|
||||||
|
legTwist: 0.5
|
||||||
|
armStretch: 0.05
|
||||||
|
legStretch: 0.05
|
||||||
|
feetSpacing: 0
|
||||||
|
globalScale: 1
|
||||||
|
rootMotionBoneName:
|
||||||
|
hasTranslationDoF: 0
|
||||||
|
hasExtraRoot: 0
|
||||||
|
skeletonHasParents: 1
|
||||||
|
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||||
|
autoGenerateAvatarMappingIfUnspecified: 1
|
||||||
|
animationType: 2
|
||||||
|
humanoidOversampling: 1
|
||||||
|
avatarSetup: 0
|
||||||
|
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||||
|
importBlendShapeDeformPercent: 1
|
||||||
|
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||||
|
additionalBone: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
BlueWater/Assets/08.Models/fish01.png
Normal file
BIN
BlueWater/Assets/08.Models/fish01.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 631 KiB |
136
BlueWater/Assets/08.Models/fish01.png.meta
Normal file
136
BlueWater/Assets/08.Models/fish01.png.meta
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b22e9f06f1fbc294c9cb94024e1e05ea
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 12
|
||||||
|
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
|
||||||
|
flipGreenChannel: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMipmapLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
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: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
swizzle: 50462976
|
||||||
|
cookieLightType: 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
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Android
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Windows Store Apps
|
||||||
|
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:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
mipmapLimitGroupName:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
4522
BlueWater/Assets/10.Shaders/Fish.shadergraph
Normal file
4522
BlueWater/Assets/10.Shaders/Fish.shadergraph
Normal file
File diff suppressed because it is too large
Load Diff
10
BlueWater/Assets/10.Shaders/Fish.shadergraph.meta
Normal file
10
BlueWater/Assets/10.Shaders/Fish.shadergraph.meta
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7cae0496bda14c04a9d5aa9138f04bda
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
109
BlueWater/Assets/10.Shaders/FishAnimation.shader
Normal file
109
BlueWater/Assets/10.Shaders/FishAnimation.shader
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
/*
|
||||||
|
Author: Alberto Mellado Cruz
|
||||||
|
Date: 09/11/2017
|
||||||
|
|
||||||
|
Comments:
|
||||||
|
This is just a test that would depend on the 3D Model used.
|
||||||
|
Vertex animations would allow the use of GPU Instancing,
|
||||||
|
enabling the use of a dense amount of animated fish.
|
||||||
|
The code may not be optimized but it was just a test
|
||||||
|
*/
|
||||||
|
|
||||||
|
Shader "Custom/FishAnimation" {
|
||||||
|
Properties{
|
||||||
|
_MainTex("Albedo (RGB)", 2D) = "white" {}
|
||||||
|
_SpeedX("SpeedX", Range(0, 10)) = 1
|
||||||
|
_FrequencyX("FrequencyX", Range(0, 10)) = 1
|
||||||
|
_AmplitudeX("AmplitudeX", Range(0, 0.2)) = 1
|
||||||
|
_SpeedY("SpeedY", Range(0, 10)) = 1
|
||||||
|
_FrequencyY("FrequencyY", Range(0, 10)) = 1
|
||||||
|
_AmplitudeY("AmplitudeY", Range(0, 0.2)) = 1
|
||||||
|
_SpeedZ("SpeedZ", Range(0, 10)) = 1
|
||||||
|
_FrequencyZ("FrequencyZ", Range(0, 10)) = 1
|
||||||
|
_AmplitudeZ("AmplitudeZ", Range(0, 2)) = 1
|
||||||
|
_HeadLimit("HeadLimit", Range(-2, 2)) = 0.05
|
||||||
|
}
|
||||||
|
SubShader{
|
||||||
|
Tags{ "RenderType" = "Opaque"
|
||||||
|
"RenderPipeline" = "UniversalPipeline"
|
||||||
|
}
|
||||||
|
Cull off
|
||||||
|
|
||||||
|
Pass{
|
||||||
|
|
||||||
|
CGPROGRAM
|
||||||
|
#pragma vertex vert
|
||||||
|
#pragma fragment frag
|
||||||
|
#include "UnityCG.cginc"
|
||||||
|
|
||||||
|
sampler2D _MainTex;
|
||||||
|
float4 _MainTex_ST;
|
||||||
|
|
||||||
|
struct v2f {
|
||||||
|
float4 pos : SV_POSITION;
|
||||||
|
float2 uv : TEXCOORD0;
|
||||||
|
};
|
||||||
|
|
||||||
|
// X AXIS
|
||||||
|
|
||||||
|
float _SpeedX;
|
||||||
|
float _FrequencyX;
|
||||||
|
float _AmplitudeX;
|
||||||
|
|
||||||
|
// Y AXIS
|
||||||
|
|
||||||
|
float _SpeedY;
|
||||||
|
float _FrequencyY;
|
||||||
|
float _AmplitudeY;
|
||||||
|
|
||||||
|
// Z AXIS
|
||||||
|
|
||||||
|
float _SpeedZ;
|
||||||
|
float _FrequencyZ;
|
||||||
|
float _AmplitudeZ;
|
||||||
|
|
||||||
|
// Head Limit (Head wont shake so much)
|
||||||
|
|
||||||
|
float _HeadLimit;
|
||||||
|
|
||||||
|
v2f vert(appdata_base v)
|
||||||
|
{
|
||||||
|
v2f o;
|
||||||
|
|
||||||
|
//Z AXIS
|
||||||
|
|
||||||
|
v.vertex.z += sin((v.vertex.z + _Time.y * _SpeedX) * _FrequencyX)* _AmplitudeX;
|
||||||
|
|
||||||
|
//Y AXIS
|
||||||
|
|
||||||
|
v.vertex.y += sin((v.vertex.z + _Time.y * _SpeedY) * _FrequencyY)* _AmplitudeY;
|
||||||
|
|
||||||
|
//X AXIS
|
||||||
|
|
||||||
|
if (v.vertex.z > _HeadLimit)
|
||||||
|
{
|
||||||
|
v.vertex.x += sin((0.05 + _Time.y * _SpeedZ) * _FrequencyZ)* _AmplitudeZ * _HeadLimit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
v.vertex.x += sin((v.vertex.z + _Time.y * _SpeedZ) * _FrequencyZ)* _AmplitudeZ * v.vertex.z;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
o.pos = UnityObjectToClipPos(v.vertex);
|
||||||
|
o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
|
||||||
|
return o;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fixed4 frag(v2f i) : SV_Target
|
||||||
|
{
|
||||||
|
return tex2D(_MainTex, i.uv);
|
||||||
|
}
|
||||||
|
|
||||||
|
ENDCG
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FallBack "Diffuse"
|
||||||
|
}
|
9
BlueWater/Assets/10.Shaders/FishAnimation.shader.meta
Normal file
9
BlueWater/Assets/10.Shaders/FishAnimation.shader.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8b0bcba1cce78b64f84471735e786188
|
||||||
|
ShaderImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
defaultTextures: []
|
||||||
|
nonModifiableTextures: []
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -37,7 +37,7 @@ TagManager:
|
|||||||
-
|
-
|
||||||
- Enemy
|
- Enemy
|
||||||
-
|
-
|
||||||
- Fish
|
- Boid
|
||||||
-
|
-
|
||||||
- Npc
|
- Npc
|
||||||
-
|
-
|
||||||
|
Loading…
Reference in New Issue
Block a user