messy messy merge >n<

This commit is contained in:
cyndrdev 2021-03-24 12:45:19 +00:00
commit 1611962ae9
397 changed files with 136379 additions and 8829 deletions

View File

@ -22,6 +22,7 @@ build:
- echo "cloned to $GIT_CLONE_PATH" - echo "cloned to $GIT_CLONE_PATH"
- chmod +x ./ci/build.sh - chmod +x ./ci/build.sh
- ./ci/build.sh $UNITY_VERSION - ./ci/build.sh $UNITY_VERSION
- cp ./readme.txt $BUILD_DIR
artifacts: artifacts:
name: $CI_PROJECT_NAME-$CI_PIPELINE_ID name: $CI_PROJECT_NAME-$CI_PIPELINE_ID

View File

@ -12,30 +12,41 @@ echo "removing previous editor log..."
echo "starting build using unity v$unityversion..." echo "starting build using unity v$unityversion..."
# launch unity in batch mode unitypid=-1
open -g $editorpath --args \
-batchmode \ launch_unity () {
-quit \ # launch unity in batch mode
-nographics \ open -g $editorpath --args \
-developmentBuild \ -batchmode \
-executeMethod "Ktyl.Util.BuildCommand.Run" \ -quit \
-logFile $editorlogpath \ -nographics \
-projectPath "$(pwd)/game" -developmentBuild \
-executeMethod "Ktyl.Util.BuildCommand.Run" \
-logFile $editorlogpath \
-projectPath "$(pwd)/game"
unitypid=`pgrep -n Unity`
echo "launched unity ($unitypid)"
}
launch_unity
# wait for editor log to exist
tries=60
count=0
while [ ! -f $editorlogpath ] while [ ! -f $editorlogpath ]
do do
sleep 1 if ps -p $unitypid > /dev/null
then
echo "waiting for unity ($unitypid)"
else
echo "unity is no longer running - trying again"
# decrement # reset launch attempts
count=`expr $count + 1` launch_unity
if [ $count -eq $tries ] ; then continue
echo "early timeout - $tries seconds elapsed since launch attempt"
exit 1
fi fi
# wait a second
sleep 1
done done
# use a safe directory that is automatically removed by the shell when the script exists # use a safe directory that is automatically removed by the shell when the script exists

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 337aa5d792078174ba9a5991458704a4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ae6e55e2712dfc24690fb49efb296230
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

BIN
game/Assets/3D Assets/Artefacts/Orb Freeze/ORB_Low.obj (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,112 @@
fileFormatVersion: 2
guid: 199d2370a6266f64587a1a9b8d2c337d
ModelImporter:
serializedVersion: 20200
internalIDToNameTable: []
externalObjects:
- first:
type: UnityEngine:Material
assembly: UnityEngine.CoreModule
name: ORB_LOW_Group5685Mat
second: {fileID: 2100000, guid: d04f54074428c82489a700d4208c5532, type: 2}
- first:
type: UnityEngine:Material
assembly: UnityEngine.CoreModule
name: Ring_Low_Group63568Mat
second: {fileID: 2100000, guid: d04f54074428c82489a700d4208c5532, type: 2}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
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
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
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
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
game/Assets/3D Assets/Artefacts/Orb Freeze/OrbAnim.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: 6049a3ac54bafac41831a7a97b6b0c7e
ModelImporter:
serializedVersion: 20200
internalIDToNameTable:
- first:
74: 1827226128182048838
second: Take 001
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
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
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
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
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5240c932eba90b042829dc130599d5ce
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,144 @@
fileFormatVersion: 2
guid: a2e6f3d878ecfc7418724c9e950c02ed
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 2
mipBias: -100
wrapU: 0
wrapV: 0
wrapW: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 8192
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: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 8192
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: 8192
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: 8192
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: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,144 @@
fileFormatVersion: 2
guid: 49cf6831f4fdfb14ca0da2f2b4cba3ad
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 2
mipBias: -100
wrapU: 0
wrapV: 0
wrapW: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 8192
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: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 8192
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: 8192
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: 8192
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: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,144 @@
fileFormatVersion: 2
guid: 1e939620d235cd54ebe979b288421314
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 2
mipBias: -100
wrapU: 0
wrapV: 0
wrapW: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 8192
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: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 8192
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: 8192
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: 8192
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: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,144 @@
fileFormatVersion: 2
guid: 4394e74068b8e5a419fcb60f39b0d9da
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 2
mipBias: -100
wrapU: 0
wrapV: 0
wrapW: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 8192
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: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 8192
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: 8192
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: 8192
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: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,144 @@
fileFormatVersion: 2
guid: 13bcb9385640733409b6a7c756c24b15
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
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
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 2
mipBias: -100
wrapU: 0
wrapV: 0
wrapW: 0
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: 0
spriteTessellationDetail: -1
textureType: 1
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 8192
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: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 8192
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: 8192
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: 8192
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: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,144 @@
fileFormatVersion: 2
guid: 456811828e35c3343afacc957dba80fb
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 2
mipBias: -100
wrapU: 0
wrapV: 0
wrapW: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 8192
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: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 8192
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: 8192
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: 8192
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: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,144 @@
fileFormatVersion: 2
guid: a6482166787d0804cb31dc3237dc9a42
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: 2
mipBias: -100
wrapU: 0
wrapV: 0
wrapW: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 8192
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: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 8192
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: 8192
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: 8192
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: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,124 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: orb_MAT
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _EMISSION _METALLICSPECGLOSSMAP _NORMALMAP _PARALLAXMAP
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 2800000, guid: 8e93b1c758b8a3b438b0d7844c063367, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 2800000, guid: 1b4589dbbea565b4e8cc4b61e98c64f7, type: 3}
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: 2800000, guid: f7b2251cc58bc884cbf3087301816671, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 8e93b1c758b8a3b438b0d7844c063367, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 2800000, guid: ff2993c63fa88024395a9569248e2d18, type: 3}
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: 2800000, guid: 26c048fd9c781ce4faf6fb43cff77a8a, type: 3}
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_Floats:
- _AlphaClip: 0
- _Blend: 0
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.546
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 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: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &7081404539000308866
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: 4

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d04f54074428c82489a700d4208c5532
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

BIN
game/Assets/AlphaChar/A_Walk.fbx (Stored with Git LFS)

Binary file not shown.

View File

@ -1,159 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1107 &-4669982441730671944
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 2131420891638955038}
m_Position: {x: 90, y: 170, z: 0}
- serializedVersion: 1
m_State: {fileID: -748621450404397517}
m_Position: {x: 90, y: 80, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: -110, y: 10, z: 0}
m_EntryPosition: {x: 110, y: 270, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 2131420891638955038}
--- !u!1102 &-748621450404397517
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Walk
m_Speed: 5
m_CycleOffset: 0
m_Transitions:
- {fileID: 1187370376802235764}
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_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 85e9b3e9f334ee44e840d547fdd6f304, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Char Ctrl
serializedVersion: 5
m_AnimatorParameters:
- m_Name: Is Walking
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: -4669982441730671944}
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!1101 &1187370376802235764
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: Is Walking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 2131420891638955038}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.90566045
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &2131420891638955038
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Idle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 4452622808242892610}
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_TimeParameterActive: 0
m_Motion: {fileID: 1827226128182048838, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &4452622808242892610
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: StartWalking
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: Is Walking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -748621450404397517}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9884527
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1

BIN
game/Assets/Character_Anim/A_Jump_Boost.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: 6cfe6c0ef6afb4f439385e34a5486ecf
ModelImporter:
serializedVersion: 20200
internalIDToNameTable:
- first:
74: 1827226128182048838
second: Take 001
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
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
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
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
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
game/Assets/Character_Anim/A_Jump_InAir.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: 2fc348bd669c9b74ea8f07ad1c281eb3
ModelImporter:
serializedVersion: 20200
internalIDToNameTable:
- first:
74: 1827226128182048838
second: Take 001
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
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
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
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
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
game/Assets/Character_Anim/A_Jump_Landing.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: 30db38f9e3b5a88438a6278460306135
ModelImporter:
serializedVersion: 20200
internalIDToNameTable:
- first:
74: 1827226128182048838
second: Take 001
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
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
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
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
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
game/Assets/Character_Anim/A_Jump_TakeOff.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: be4164daf5813fc40a05977ffd5542f0
ModelImporter:
serializedVersion: 20200
internalIDToNameTable:
- first:
74: 1827226128182048838
second: Take 001
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
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
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
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
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
game/Assets/Character_Anim/A_Run.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: 98c2cd39b2a3a324792ea610b532654e
ModelImporter:
serializedVersion: 20200
internalIDToNameTable:
- first:
74: 1827226128182048838
second: Take 001
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
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
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
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
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
game/Assets/Character_Anim/A_Walk.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,11 +1,11 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: f56ca56a969bf2844a912c84e69bbcdf guid: ac247fb003b929844b101e718dc3ca13
ModelImporter: ModelImporter:
serializedVersion: 20200 serializedVersion: 20200
internalIDToNameTable: internalIDToNameTable:
- first: - first:
74: 1827226128182048838 74: 1827226128182048838
second: Walk second: Take 001
externalObjects: {} externalObjects: {}
materials: materials:
materialImportMode: 2 materialImportMode: 2
@ -33,36 +33,7 @@ ModelImporter:
animationWrapMode: 0 animationWrapMode: 0
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: clipAnimations: []
- serializedVersion: 16
name: Walk
takeName: Take 001
internalID: 0
firstFrame: 1300
lastFrame: 1459
wrapMode: 0
orientationOffsetY: 0
level: 0
cycleOffset: 0
loop: 0
hasAdditiveReferencePose: 0
loopTime: 1
loopBlend: 0
loopBlendOrientation: 0
loopBlendPositionY: 0
loopBlendPositionXZ: 0
keepOriginalOrientation: 0
keepOriginalPositionY: 1
keepOriginalPositionXZ: 0
heightFromFeet: 0
mirror: 0
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
curves: []
events: []
transformMask: []
maskType: 3
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 1300
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 862a19d8877420b4387f911a8c68110c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 27061ef040be78341a048a60a7740aa8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4dfa008826a8a5e4caa29a9f4b4e9fbe
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 400a0aac0b38d2c429ba53b3f5d47cc5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f94f0f6129b7c334d8fd3147d2f4b628
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 85e9b3e9f334ee44e840d547fdd6f304 guid: 4992e4c74822c624da6c52ac33801b96
NativeFormatImporter: NativeFormatImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 7400000 mainObjectFileID: 7400000

View File

@ -0,0 +1,608 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1101 &-8633728715219653837
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 7417648013747824764}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 1
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 4
m_OrderedInterruption: 0
m_CanTransitionToSelf: 1
--- !u!1101 &-8237246380781921263
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: InBoostState
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 3221672209289342883}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 4
m_OrderedInterruption: 0
m_CanTransitionToSelf: 1
--- !u!1101 &-7916693450357402312
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: InJumpState
m_EventTreshold: 0
- m_ConditionMode: 2
m_ConditionEvent: InBoostState
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 6158004599323219404}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 4
m_OrderedInterruption: 0
m_CanTransitionToSelf: 1
--- !u!1101 &-7402131631877207942
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: InJumpState
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -7175674927923829264}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 4
m_OrderedInterruption: 0
m_CanTransitionToSelf: 1
--- !u!1102 &-7175674927923829264
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Jump Begin
m_Speed: 5
m_CycleOffset: 0
m_Transitions:
- {fileID: 6627086963765148649}
- {fileID: -3069531632362253192}
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_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 400a0aac0b38d2c429ba53b3f5d47cc5, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &-4669982441730671944
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 2131420891638955038}
m_Position: {x: 90, y: 170, z: 0}
- serializedVersion: 1
m_State: {fileID: -748621450404397517}
m_Position: {x: -160, y: 170, z: 0}
- serializedVersion: 1
m_State: {fileID: -908005854898768128}
m_Position: {x: -290, y: -80, z: 0}
- serializedVersion: 1
m_State: {fileID: -7175674927923829264}
m_Position: {x: -290, y: -10, z: 0}
- serializedVersion: 1
m_State: {fileID: 3221672209289342883}
m_Position: {x: -290, y: -150, z: 0}
- serializedVersion: 1
m_State: {fileID: 6158004599323219404}
m_Position: {x: -30, y: -110, z: 0}
- serializedVersion: 1
m_State: {fileID: 7417648013747824764}
m_Position: {x: -290, y: -220, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: -210, y: 370, z: 0}
m_EntryPosition: {x: 110, y: 270, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 2131420891638955038}
--- !u!1101 &-3069531632362253192
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -908005854898768128}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 1
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 1
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-2107755844975236895
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: InJumpState
m_EventTreshold: 0
- m_ConditionMode: 2
m_ConditionEvent: InBoostState
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 6158004599323219404}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 4
m_OrderedInterruption: 0
m_CanTransitionToSelf: 1
--- !u!1102 &-908005854898768128
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Jump In-Air
m_Speed: 5
m_CycleOffset: 0
m_Transitions:
- {fileID: -7916693450357402312}
- {fileID: -8237246380781921263}
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_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 27061ef040be78341a048a60a7740aa8, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &-748621450404397517
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Walk
m_Speed: 5
m_CycleOffset: 0
m_Transitions:
- {fileID: 1575648880716201585}
- {fileID: 1187370376802235764}
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_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: f94f0f6129b7c334d8fd3147d2f4b628, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Char Ctrl
serializedVersion: 5
m_AnimatorParameters:
- m_Name: IsWalking
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
- m_Name: InJumpState
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
- m_Name: InBoostState
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: -4669982441730671944}
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!1101 &1187370376802235764
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: IsWalking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 2131420891638955038}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.90566045
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1575648880716201585
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: InJumpState
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -7175674927923829264}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 4
m_OrderedInterruption: 0
m_CanTransitionToSelf: 1
--- !u!1102 &2131420891638955038
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Idle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: -7402131631877207942}
- {fileID: 4452622808242892610}
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_TimeParameterActive: 0
m_Motion: {fileID: 1827226128182048838, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &2544625993618665896
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: IsWalking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 2131420891638955038}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.08
m_TransitionOffset: 0
m_ExitTime: 0.8
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &2660762485539089672
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: IsWalking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -748621450404397517}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &3221672209289342883
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Jump Boost
m_Speed: 5
m_CycleOffset: 0
m_Transitions:
- {fileID: -2107755844975236895}
- {fileID: -8633728715219653837}
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_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 862a19d8877420b4387f911a8c68110c, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &4452622808242892610
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: StartWalking
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: IsWalking
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -748621450404397517}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9884527
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &5991315514625531727
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: InJumpState
m_EventTreshold: 0
- m_ConditionMode: 2
m_ConditionEvent: InBoostState
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 6158004599323219404}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.86238533
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 4
m_OrderedInterruption: 0
m_CanTransitionToSelf: 1
--- !u!1102 &6158004599323219404
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Jump Land
m_Speed: 5
m_CycleOffset: 0
m_Transitions:
- {fileID: 2544625993618665896}
- {fileID: 2660762485539089672}
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_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 4dfa008826a8a5e4caa29a9f4b4e9fbe, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &6627086963765148649
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: InJumpState
m_EventTreshold: 0
- m_ConditionMode: 2
m_ConditionEvent: InBoostState
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 6158004599323219404}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 4
m_OrderedInterruption: 0
m_CanTransitionToSelf: 1
--- !u!1102 &7417648013747824764
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Jump In-Air Post-Boost
m_Speed: 5
m_CycleOffset: 0
m_Transitions:
- {fileID: 5991315514625531727}
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_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 27061ef040be78341a048a60a7740aa8, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:

View File

@ -15,3 +15,4 @@ MonoBehaviour:
_artefactID: 0 _artefactID: 0
_dialogueKey: _dialogueKey:
_name: _name:
_prefab: {fileID: 3799998566341120319, guid: e48f46564bce92e4aa707fd447afd68e, type: 3}

View File

@ -15,4 +15,5 @@ MonoBehaviour:
_artefactID: 10 _artefactID: 10
_dialogueKey: PA_DASH _dialogueKey: PA_DASH
_name: Blink _name: Blink
_prefab: {fileID: 3799998566341120319, guid: e48f46564bce92e4aa707fd447afd68e, type: 3}
_power: {fileID: 11400000, guid: b47ea197a7cc2ed4eb15271cef672997, type: 2} _power: {fileID: 11400000, guid: b47ea197a7cc2ed4eb15271cef672997, type: 2}

View File

@ -15,4 +15,5 @@ MonoBehaviour:
_artefactID: 11 _artefactID: 11
_dialogueKey: PA_BOOST _dialogueKey: PA_BOOST
_name: Boost _name: Boost
_prefab: {fileID: 3799998566341120319, guid: e48f46564bce92e4aa707fd447afd68e, type: 3}
_power: {fileID: 11400000, guid: d5ed942937d8cca478f3ec97f6b9c8a2, type: 2} _power: {fileID: 11400000, guid: d5ed942937d8cca478f3ec97f6b9c8a2, type: 2}

View File

@ -15,3 +15,4 @@ MonoBehaviour:
_artefactID: 20 _artefactID: 20
_dialogueKey: WA_0 _dialogueKey: WA_0
_name: Widget _name: Widget
_prefab: {fileID: 3799998566341120319, guid: e48f46564bce92e4aa707fd447afd68e, type: 3}

View File

@ -12,6 +12,16 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: a6a4c7f569d69ca4e8498fdcd96476ce, type: 3} m_Script: {fileID: 11500000, guid: a6a4c7f569d69ca4e8498fdcd96476ce, type: 3}
m_Name: Dialogue Settings m_Name: Dialogue Settings
m_EditorClassIdentifier: m_EditorClassIdentifier:
_gamepadInputPrompts:
blink: 1
boost: 5
timeFreeze: 3
interact: 7
_keyboardInputPrompts:
blink: 2
boost: 0
timeFreeze: 4
interact: 6
_hideAfter: 5 _hideAfter: 5
_radioDialogueKey: event:/VO/Radio Dialogue Line _radioDialogueKey: event:/VO/Radio Dialogue Line
_dialogueClips: _dialogueClips:

View File

@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 3a977303773797047b37664649362484, type: 3}
m_Name: UIClose
m_EditorClassIdentifier:
_logRaised: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d8c4272694282b64e9cd1d4a42477262
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 3a977303773797047b37664649362484, type: 3}
m_Name: UIOpen
m_EditorClassIdentifier:
_logRaised: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0fc36e00903fc7047b48bb1844e6f12b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 76553ada4233edc458c3fed9b69e128f, type: 3}
m_Name: Safe Time
m_EditorClassIdentifier:
_initialValue: 0
_readOnly: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 27c10a061baeec8469e96d4f995c1445
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 859b47edaf12fe14782789af604151d5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c78921add991a914aa4263c80d69a9d6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: fded9f896ea32473eb30ae61b640a176
folderAsset: yes
timeCreated: 1519645413
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 76c2f3171eae9954aa317277dbffd478
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 366e41d4e3408334aad31e48f28757e4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,43 @@
using UnityEngine;
using UnityEditor;
using PathCreation;
namespace PathCreationEditor
{
public static class MouseUtility
{
/// <summary>
/// Determines mouse position in world. If PathSpace is xy/xz, the position will be locked to that plane.
/// If PathSpace is xyz, then depthFor3DSpace will be used as distance from scene camera.
/// </summary>
public static Vector3 GetMouseWorldPosition(PathSpace space, float depthFor3DSpace = 10)
{
Ray mouseRay = HandleUtility.GUIPointToWorldRay(Event.current.mousePosition);
Vector3 worldMouse = mouseRay.GetPoint(depthFor3DSpace);
// Mouse can only move on XY plane
if (space == PathSpace.xy)
{
float zDir = mouseRay.direction.z;
if (zDir != 0)
{
float dstToXYPlane = Mathf.Abs(mouseRay.origin.z / zDir);
worldMouse = mouseRay.GetPoint(dstToXYPlane);
}
}
// Mouse can only move on XZ plane
else if (space == PathSpace.xz)
{
float yDir = mouseRay.direction.y;
if (yDir != 0)
{
float dstToXZPlane = Mathf.Abs(mouseRay.origin.y / yDir);
worldMouse = mouseRay.GetPoint(dstToXZPlane);
}
}
return worldMouse;
}
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 44966bb2b773ce145a9d6c7c9f42aeba guid: bd0de63ca5c52504a8d2063418a326c3
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@ -0,0 +1,237 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using PathCreation;
namespace PathCreationEditor
{
public static class PathHandle
{
public const float extraInputRadius = .005f;
static Vector2 handleDragMouseStart;
static Vector2 handleDragMouseEnd;
static Vector3 handleDragWorldStart;
static int selectedHandleID;
static bool mouseIsOverAHandle;
public enum HandleInputType
{
None,
LMBPress,
LMBClick,
LMBDrag,
LMBRelease,
};
static float dstMouseToDragPointStart;
static List<int> ids;
static HashSet<int> idHash;
static PathHandle()
{
ids = new List<int>();
idHash = new HashSet<int>();
dstMouseToDragPointStart = float.MaxValue;
}
public static Vector3 DrawHandle(Vector3 position, PathSpace space, bool isInteractive, float handleDiameter, Handles.CapFunction capFunc, HandleColours colours, out HandleInputType inputType, int handleIndex)
{
int id = GetID(handleIndex);
Vector3 screenPosition = Handles.matrix.MultiplyPoint(position);
Matrix4x4 cachedMatrix = Handles.matrix;
inputType = HandleInputType.None;
EventType eventType = Event.current.GetTypeForControl(id);
float handleRadius = handleDiameter / 2f;
float dstToHandle = HandleUtility.DistanceToCircle(position, handleRadius + extraInputRadius);
float dstToMouse = HandleUtility.DistanceToCircle(position, 0);
// Handle input events
if (isInteractive)
{
// Repaint if mouse is entering/exiting handle (for highlight colour)
if (dstToHandle == 0)
{
if (!mouseIsOverAHandle)
{
HandleUtility.Repaint();
mouseIsOverAHandle = true;
}
}
else
{
if (mouseIsOverAHandle)
{
HandleUtility.Repaint();
mouseIsOverAHandle = false;
}
}
switch (eventType)
{
case EventType.MouseDown:
if (Event.current.button == 0 && Event.current.modifiers != EventModifiers.Alt)
{
if (dstToHandle == 0 && dstToMouse < dstMouseToDragPointStart)
{
dstMouseToDragPointStart = dstToMouse;
GUIUtility.hotControl = id;
handleDragMouseEnd = handleDragMouseStart = Event.current.mousePosition;
handleDragWorldStart = position;
selectedHandleID = id;
inputType = HandleInputType.LMBPress;
}
}
break;
case EventType.MouseUp:
dstMouseToDragPointStart = float.MaxValue;
if (GUIUtility.hotControl == id && Event.current.button == 0)
{
GUIUtility.hotControl = 0;
selectedHandleID = -1;
Event.current.Use();
inputType = HandleInputType.LMBRelease;
if (Event.current.mousePosition == handleDragMouseStart)
{
inputType = HandleInputType.LMBClick;
}
}
break;
case EventType.MouseDrag:
if (GUIUtility.hotControl == id && Event.current.button == 0)
{
handleDragMouseEnd += new Vector2(Event.current.delta.x, -Event.current.delta.y);
Vector3 position2 = Camera.current.WorldToScreenPoint(Handles.matrix.MultiplyPoint(handleDragWorldStart))
+ (Vector3)(handleDragMouseEnd - handleDragMouseStart);
inputType = HandleInputType.LMBDrag;
// Handle can move freely in 3d space
if (space == PathSpace.xyz)
{
position = Handles.matrix.inverse.MultiplyPoint(Camera.current.ScreenToWorldPoint(position2));
}
// Handle is clamped to xy or xz plane
else
{
position = MouseUtility.GetMouseWorldPosition(space);
}
GUI.changed = true;
Event.current.Use();
}
break;
}
}
switch (eventType)
{
case EventType.Repaint:
Color originalColour = Handles.color;
Handles.color = (isInteractive) ? colours.defaultColour : colours.disabledColour;
if (id == GUIUtility.hotControl)
{
Handles.color = colours.selectedColour;
}
else if (dstToHandle == 0 && selectedHandleID == -1 && isInteractive)
{
Handles.color = colours.highlightedColour;
}
Handles.matrix = Matrix4x4.identity;
Vector3 lookForward = Vector3.up;
Camera cam = Camera.current;
if (cam != null)
{
if (cam.orthographic)
{
lookForward= -cam.transform.forward;
}
else
{
lookForward = (cam.transform.position - position);
}
}
capFunc(id, screenPosition, Quaternion.LookRotation(lookForward), handleDiameter, EventType.Repaint);
Handles.matrix = cachedMatrix;
Handles.color = originalColour;
break;
case EventType.Layout:
Handles.matrix = Matrix4x4.identity;
HandleUtility.AddControl(id, HandleUtility.DistanceToCircle(screenPosition, handleDiameter / 2f));
Handles.matrix = cachedMatrix;
break;
}
return position;
}
public struct HandleColours
{
public Color defaultColour;
public Color highlightedColour;
public Color selectedColour;
public Color disabledColour;
public HandleColours(Color defaultColour, Color highlightedColour, Color selectedColour, Color disabledColour)
{
this.defaultColour = defaultColour;
this.highlightedColour = highlightedColour;
this.selectedColour = selectedColour;
this.disabledColour = disabledColour;
}
}
static void AddIDs(int upToIndex)
{
int numIDAtStart = ids.Count;
int numToAdd = (upToIndex - numIDAtStart) + 1;
for (int i = 0; i < numToAdd; i++)
{
string hashString = string.Format("pathhandle({0})", numIDAtStart + i);
int hash = hashString.GetHashCode();
int id = GUIUtility.GetControlID(hash, FocusType.Passive);
int numIts = 0;
// This is a bit of a shot in the dark at fixing a reported bug that I've been unable to reproduce.
// The problem is that multiple handles are being selected when just one is clicked on.
// I assume this is because they're somehow being assigned the same id.
while (idHash.Contains(id)) {
numIts ++;
id += numIts * numIts;
if (numIts > 100) {
Debug.LogError("Failed to generate unique handle id.");
break;
}
}
idHash.Add(id);
ids.Add(id);
}
}
static int GetID(int handleIndex)
{
if (handleIndex >= ids.Count)
{
AddIDs(handleIndex);
}
return ids[handleIndex];
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 804ddb43548540a4ca3b0a534a75c4b3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,215 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using PathCreation;
using PathCreation.Utility;
namespace PathCreationEditor
{
public class ScreenSpacePolyLine
{
const int accuracyMultiplier = 10;
// dont allow vertices to be spaced too far apart, as screenspace-worldspace conversion can then be noticeably off
const float intermediaryThreshold = .2f;
public readonly List<Vector3> verticesWorld;
// For each point in the polyline, says which bezier segment it belongs to
readonly List<int> vertexToPathSegmentMap;
// Stores the index in the vertices list where the start point of each segment is
readonly int[] segmentStartIndices;
readonly float pathLengthWorld;
readonly float[] cumululativeLengthWorld;
Vector2[] points;
Vector3 prevCamPos;
Quaternion prevCamRot;
bool premCamIsOrtho;
readonly Transform transform;
readonly Vector3 transformPosition;
readonly Quaternion transformRotation;
readonly Vector3 transformScale;
public ScreenSpacePolyLine(BezierPath bezierPath, Transform transform, float maxAngleError, float minVertexDst, float accuracy = 1)
{
this.transform = transform;
transformPosition = transform.position;
transformRotation = transform.rotation;
transformScale = transform.localScale;
// Split path in vertices based on angle error
verticesWorld = new List<Vector3>();
vertexToPathSegmentMap = new List<int>();
segmentStartIndices = new int[bezierPath.NumSegments+1];
verticesWorld.Add(bezierPath[0]);
vertexToPathSegmentMap.Add(0);
Vector3 prevPointOnPath = bezierPath[0];
float dstSinceLastVertex = 0;
Vector3 lastAddedPoint = prevPointOnPath;
float dstSinceLastIntermediary = 0;
for (int segmentIndex = 0; segmentIndex < bezierPath.NumSegments; segmentIndex++)
{
Vector3[] segmentPoints = bezierPath.GetPointsInSegment(segmentIndex);
verticesWorld.Add(segmentPoints[0]);
vertexToPathSegmentMap.Add(segmentIndex);
segmentStartIndices[segmentIndex] = verticesWorld.Count-1;
prevPointOnPath = segmentPoints[0];
lastAddedPoint = prevPointOnPath;
dstSinceLastVertex = 0;
dstSinceLastIntermediary = 0;
float estimatedSegmentLength = CubicBezierUtility.EstimateCurveLength(segmentPoints[0], segmentPoints[1], segmentPoints[2], segmentPoints[3]);
int divisions = Mathf.CeilToInt(estimatedSegmentLength * accuracy * accuracyMultiplier);
float increment = 1f / divisions;
for (float t = increment; t <= 1; t += increment)
{
Vector3 pointOnPath = CubicBezierUtility.EvaluateCurve(segmentPoints[0], segmentPoints[1], segmentPoints[2], segmentPoints[3], t);
Vector3 nextPointOnPath = CubicBezierUtility.EvaluateCurve(segmentPoints[0], segmentPoints[1], segmentPoints[2], segmentPoints[3], t + increment);
// angle at current point on path
float localAngle = 180 - MathUtility.MinAngle(prevPointOnPath, pointOnPath, nextPointOnPath);
// angle between the last added vertex, the current point on the path, and the next point on the path
float angleFromPrevVertex = 180 - MathUtility.MinAngle(lastAddedPoint, pointOnPath, nextPointOnPath);
float angleError = Mathf.Max(localAngle, angleFromPrevVertex);
if (angleError > maxAngleError && dstSinceLastVertex >= minVertexDst)
{
dstSinceLastVertex = 0;
dstSinceLastIntermediary = 0;
verticesWorld.Add(pointOnPath);
vertexToPathSegmentMap.Add(segmentIndex);
lastAddedPoint = pointOnPath;
}
else
{
if (dstSinceLastIntermediary > intermediaryThreshold)
{
verticesWorld.Add(pointOnPath);
vertexToPathSegmentMap.Add(segmentIndex);
dstSinceLastIntermediary = 0;
}
else
{
dstSinceLastIntermediary += (pointOnPath - prevPointOnPath).magnitude;
}
dstSinceLastVertex += (pointOnPath - prevPointOnPath).magnitude;
}
prevPointOnPath = pointOnPath;
}
}
segmentStartIndices[bezierPath.NumSegments] = verticesWorld.Count;
// ensure final point gets added (unless path is closed loop)
if (!bezierPath.IsClosed)
{
verticesWorld.Add(bezierPath[bezierPath.NumPoints - 1]);
}
else
{
verticesWorld.Add(bezierPath[0]);
}
// Calculate length
cumululativeLengthWorld = new float[verticesWorld.Count];
for (int i = 0; i < verticesWorld.Count; i++)
{
verticesWorld[i] = MathUtility.TransformPoint(verticesWorld[i], transform, bezierPath.Space);
if (i > 0) {
pathLengthWorld += (verticesWorld[i - 1] - verticesWorld[i]).magnitude;
cumululativeLengthWorld[i] = pathLengthWorld;
}
}
}
void ComputeScreenSpace()
{
if (Camera.current.transform.position != prevCamPos || Camera.current.transform.rotation != prevCamRot || Camera.current.orthographic != premCamIsOrtho)
{
points = new Vector2[verticesWorld.Count];
for (int i = 0; i < verticesWorld.Count; i++)
{
points[i] = HandleUtility.WorldToGUIPoint(verticesWorld[i]);
}
prevCamPos = Camera.current.transform.position;
prevCamRot = Camera.current.transform.rotation;
premCamIsOrtho = Camera.current.orthographic;
}
}
public MouseInfo CalculateMouseInfo()
{
ComputeScreenSpace();
Vector2 mousePos = Event.current.mousePosition;
float minDst = float.MaxValue;
int closestPolyLineSegmentIndex = 0;
int closestBezierSegmentIndex = 0;
for (int i = 0; i < points.Length - 1; i++)
{
float dst = HandleUtility.DistancePointToLineSegment(mousePos, points[i], points[i + 1]);
if (dst < minDst)
{
minDst = dst;
closestPolyLineSegmentIndex = i;
closestBezierSegmentIndex = vertexToPathSegmentMap[i];
}
}
Vector2 closestPointOnLine = MathUtility.ClosestPointOnLineSegment(mousePos, points[closestPolyLineSegmentIndex], points[closestPolyLineSegmentIndex + 1]);
float dstToPointOnLine = (points[closestPolyLineSegmentIndex] - closestPointOnLine).magnitude;
float percentBetweenVertices = dstToPointOnLine / (points[closestPolyLineSegmentIndex] - points[closestPolyLineSegmentIndex + 1]).magnitude;
Vector3 closestPoint3D = Vector3.Lerp(verticesWorld[closestPolyLineSegmentIndex], verticesWorld[closestPolyLineSegmentIndex + 1], percentBetweenVertices);
float distanceAlongPathWorld = cumululativeLengthWorld[closestPolyLineSegmentIndex] + Vector3.Distance(verticesWorld[closestPolyLineSegmentIndex], closestPoint3D);
float timeAlongPath = distanceAlongPathWorld / pathLengthWorld;
// Calculate how far between the current bezier segment the closest point on the line is
int bezierSegmentStartIndex = segmentStartIndices[closestBezierSegmentIndex];
int bezierSegmentEndIndex = segmentStartIndices[closestBezierSegmentIndex+1];
float bezierSegmentLength = cumululativeLengthWorld[bezierSegmentEndIndex] - cumululativeLengthWorld[bezierSegmentStartIndex];
float distanceAlongBezierSegment = distanceAlongPathWorld - cumululativeLengthWorld[bezierSegmentStartIndex];
float timeAlongBezierSegment = distanceAlongBezierSegment/bezierSegmentLength;
return new MouseInfo(minDst, closestPoint3D, distanceAlongPathWorld, timeAlongPath, timeAlongBezierSegment, closestBezierSegmentIndex);
}
public bool TransformIsOutOfDate() {
return transform.position != transformPosition || transform.rotation != transformRotation || transform.localScale != transformScale;
}
public struct MouseInfo
{
public readonly float mouseDstToLine;
public readonly Vector3 closestWorldPointToMouse;
public readonly float distanceAlongPathWorld;
public readonly float timeOnPath;
public readonly float timeOnBezierSegment;
public readonly int closestSegmentIndex;
public MouseInfo(float mouseDstToLine, Vector3 closestWorldPointToMouse, float distanceAlongPathWorld, float timeOnPath, float timeOnBezierSegment, int closestSegmentIndex)
{
this.mouseDstToLine = mouseDstToLine;
this.closestWorldPointToMouse = closestWorldPointToMouse;
this.distanceAlongPathWorld = distanceAlongPathWorld;
this.timeOnPath = timeOnPath;
this.timeOnBezierSegment = timeOnBezierSegment;
this.closestSegmentIndex = closestSegmentIndex;
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 05aed72a972059e45a62e31c2bb60fc4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,16 @@
{
"name": "PathCreatorEditor",
"references": [
"PathCreator"
],
"optionalUnityReferences": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 92ee438f32d811247a22ca14bf2a3fe0
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,736 @@
using System.Collections.Generic;
using PathCreation;
using PathCreation.Utility;
using UnityEditor;
using UnityEditor.IMGUI.Controls;
using UnityEngine;
namespace PathCreationEditor {
/// Editor class for the creation of Bezier and Vertex paths
[CustomEditor (typeof (PathCreator))]
public class PathEditor : Editor {
#region Fields
// Interaction:
const float segmentSelectDistanceThreshold = 10f;
const float screenPolylineMaxAngleError = .3f;
const float screenPolylineMinVertexDst = .01f;
// Help messages:
const string helpInfo = "Shift-click to add or insert new points. Control-click to delete points. For more detailed infomation, please refer to the documentation.";
static readonly string[] spaceNames = { "3D (xyz)", "2D (xy)", "Top-down (xz)" };
static readonly string[] tabNames = { "Bézier Path", "Vertex Path" };
const string constantSizeTooltip = "If true, anchor and control points will keep a constant size when zooming in the editor.";
// Display
const int inspectorSectionSpacing = 10;
const float constantHandleScale = .01f;
const float normalsSpacing = .2f;
GUIStyle boldFoldoutStyle;
// References:
PathCreator creator;
Editor globalDisplaySettingsEditor;
ScreenSpacePolyLine screenSpaceLine;
ScreenSpacePolyLine.MouseInfo pathMouseInfo;
GlobalDisplaySettings globalDisplaySettings;
PathHandle.HandleColours splineAnchorColours;
PathHandle.HandleColours splineControlColours;
Dictionary<GlobalDisplaySettings.HandleType, Handles.CapFunction> capFunctions;
ArcHandle anchorAngleHandle = new ArcHandle ();
VertexPath normalsVertexPath;
// State variables:
int selectedSegmentIndex;
int draggingHandleIndex;
int mouseOverHandleIndex;
int handleIndexToDisplayAsTransform;
bool shiftLastFrame;
bool hasUpdatedScreenSpaceLine;
bool hasUpdatedNormalsVertexPath;
bool editingNormalsOld;
Vector3 transformPos;
Vector3 transformScale;
Quaternion transformRot;
Color handlesStartCol;
// Constants
const int bezierPathTab = 0;
const int vertexPathTab = 1;
#endregion
#region Inspectors
public override void OnInspectorGUI () {
// Initialize GUI styles
if (boldFoldoutStyle == null) {
boldFoldoutStyle = new GUIStyle (EditorStyles.foldout);
boldFoldoutStyle.fontStyle = FontStyle.Bold;
}
Undo.RecordObject (creator, "Path settings changed");
// Draw Bezier and Vertex tabs
int tabIndex = GUILayout.Toolbar (data.tabIndex, tabNames);
if (tabIndex != data.tabIndex) {
data.tabIndex = tabIndex;
TabChanged ();
}
// Draw inspector for active tab
switch (data.tabIndex) {
case bezierPathTab:
DrawBezierPathInspector ();
break;
case vertexPathTab:
DrawVertexPathInspector ();
break;
}
// Notify of undo/redo that might modify the path
if (Event.current.type == EventType.ValidateCommand && Event.current.commandName == "UndoRedoPerformed") {
data.PathModifiedByUndo ();
}
}
void DrawBezierPathInspector () {
using (var check = new EditorGUI.ChangeCheckScope ()) {
// Path options:
data.showPathOptions = EditorGUILayout.Foldout (data.showPathOptions, new GUIContent ("Bézier Path Options"), true, boldFoldoutStyle);
if (data.showPathOptions) {
bezierPath.Space = (PathSpace) EditorGUILayout.Popup ("Space", (int) bezierPath.Space, spaceNames);
bezierPath.ControlPointMode = (BezierPath.ControlMode) EditorGUILayout.EnumPopup (new GUIContent ("Control Mode"), bezierPath.ControlPointMode);
if (bezierPath.ControlPointMode == BezierPath.ControlMode.Automatic) {
bezierPath.AutoControlLength = EditorGUILayout.Slider (new GUIContent ("Control Spacing"), bezierPath.AutoControlLength, 0, 1);
}
bezierPath.IsClosed = EditorGUILayout.Toggle ("Closed Path", bezierPath.IsClosed);
data.showTransformTool = EditorGUILayout.Toggle (new GUIContent ("Enable Transforms"), data.showTransformTool);
Tools.hidden = !data.showTransformTool;
// Check if out of bounds (can occur after undo operations)
if (handleIndexToDisplayAsTransform >= bezierPath.NumPoints) {
handleIndexToDisplayAsTransform = -1;
}
// If a point has been selected
if (handleIndexToDisplayAsTransform != -1) {
EditorGUILayout.LabelField ("Selected Point:");
using (new EditorGUI.IndentLevelScope ()) {
var currentPosition = creator.bezierPath[handleIndexToDisplayAsTransform];
var newPosition = EditorGUILayout.Vector3Field ("Position", currentPosition);
if (newPosition != currentPosition) {
Undo.RecordObject (creator, "Move point");
creator.bezierPath.MovePoint (handleIndexToDisplayAsTransform, newPosition);
}
// Don't draw the angle field if we aren't selecting an anchor point/not in 3d space
if (handleIndexToDisplayAsTransform % 3 == 0 && creator.bezierPath.Space == PathSpace.xyz) {
var anchorIndex = handleIndexToDisplayAsTransform / 3;
var currentAngle = creator.bezierPath.GetAnchorNormalAngle (anchorIndex);
var newAngle = EditorGUILayout.FloatField ("Angle", currentAngle);
if (newAngle != currentAngle) {
Undo.RecordObject (creator, "Set Angle");
creator.bezierPath.SetAnchorNormalAngle (anchorIndex, newAngle);
}
}
}
}
if (data.showTransformTool & (handleIndexToDisplayAsTransform == -1)) {
if (GUILayout.Button ("Centre Transform")) {
Vector3 worldCentre = bezierPath.CalculateBoundsWithTransform (creator.transform).center;
Vector3 transformPos = creator.transform.position;
if (bezierPath.Space == PathSpace.xy) {
transformPos = new Vector3 (transformPos.x, transformPos.y, 0);
} else if (bezierPath.Space == PathSpace.xz) {
transformPos = new Vector3 (transformPos.x, 0, transformPos.z);
}
Vector3 worldCentreToTransform = transformPos - worldCentre;
if (worldCentre != creator.transform.position) {
//Undo.RecordObject (creator, "Centralize Transform");
if (worldCentreToTransform != Vector3.zero) {
Vector3 localCentreToTransform = MathUtility.InverseTransformVector (worldCentreToTransform, creator.transform, bezierPath.Space);
for (int i = 0; i < bezierPath.NumPoints; i++) {
bezierPath.SetPoint (i, bezierPath.GetPoint (i) + localCentreToTransform, true);
}
}
creator.transform.position = worldCentre;
bezierPath.NotifyPathModified ();
}
}
}
if (GUILayout.Button ("Reset Path")) {
Undo.RecordObject (creator, "Reset Path");
bool in2DEditorMode = EditorSettings.defaultBehaviorMode == EditorBehaviorMode.Mode2D;
data.ResetBezierPath (creator.transform.position, in2DEditorMode);
EditorApplication.QueuePlayerLoopUpdate ();
}
GUILayout.Space (inspectorSectionSpacing);
}
data.showNormals = EditorGUILayout.Foldout (data.showNormals, new GUIContent ("Normals Options"), true, boldFoldoutStyle);
if (data.showNormals) {
bezierPath.FlipNormals = EditorGUILayout.Toggle (new GUIContent ("Flip Normals"), bezierPath.FlipNormals);
if (bezierPath.Space == PathSpace.xyz) {
bezierPath.GlobalNormalsAngle = EditorGUILayout.Slider (new GUIContent ("Global Angle"), bezierPath.GlobalNormalsAngle, 0, 360);
if (GUILayout.Button ("Reset Normals")) {
Undo.RecordObject (creator, "Reset Normals");
bezierPath.FlipNormals = false;
bezierPath.ResetNormalAngles ();
}
}
GUILayout.Space (inspectorSectionSpacing);
}
// Editor display options
data.showDisplayOptions = EditorGUILayout.Foldout (data.showDisplayOptions, new GUIContent ("Display Options"), true, boldFoldoutStyle);
if (data.showDisplayOptions) {
data.showPathBounds = GUILayout.Toggle (data.showPathBounds, new GUIContent ("Show Path Bounds"));
data.showPerSegmentBounds = GUILayout.Toggle (data.showPerSegmentBounds, new GUIContent ("Show Segment Bounds"));
data.displayAnchorPoints = GUILayout.Toggle (data.displayAnchorPoints, new GUIContent ("Show Anchor Points"));
if (!(bezierPath.ControlPointMode == BezierPath.ControlMode.Automatic && globalDisplaySettings.hideAutoControls)) {
data.displayControlPoints = GUILayout.Toggle (data.displayControlPoints, new GUIContent ("Show Control Points"));
}
data.keepConstantHandleSize = GUILayout.Toggle (data.keepConstantHandleSize, new GUIContent ("Constant Point Size", constantSizeTooltip));
data.bezierHandleScale = Mathf.Max (0, EditorGUILayout.FloatField (new GUIContent ("Handle Scale"), data.bezierHandleScale));
DrawGlobalDisplaySettingsInspector ();
}
if (check.changed) {
SceneView.RepaintAll ();
EditorApplication.QueuePlayerLoopUpdate ();
}
}
}
void DrawVertexPathInspector () {
GUILayout.Space (inspectorSectionSpacing);
EditorGUILayout.LabelField ("Vertex count: " + creator.path.NumPoints);
GUILayout.Space (inspectorSectionSpacing);
data.showVertexPathOptions = EditorGUILayout.Foldout (data.showVertexPathOptions, new GUIContent ("Vertex Path Options"), true, boldFoldoutStyle);
if (data.showVertexPathOptions) {
using (var check = new EditorGUI.ChangeCheckScope ()) {
data.vertexPathMaxAngleError = EditorGUILayout.Slider (new GUIContent ("Max Angle Error"), data.vertexPathMaxAngleError, 0, 45);
data.vertexPathMinVertexSpacing = EditorGUILayout.Slider (new GUIContent ("Min Vertex Dst"), data.vertexPathMinVertexSpacing, 0, 1);
GUILayout.Space (inspectorSectionSpacing);
if (check.changed) {
data.VertexPathSettingsChanged ();
SceneView.RepaintAll ();
EditorApplication.QueuePlayerLoopUpdate ();
}
}
}
data.showVertexPathDisplayOptions = EditorGUILayout.Foldout (data.showVertexPathDisplayOptions, new GUIContent ("Display Options"), true, boldFoldoutStyle);
if (data.showVertexPathDisplayOptions) {
using (var check = new EditorGUI.ChangeCheckScope ()) {
data.showNormalsInVertexMode = GUILayout.Toggle (data.showNormalsInVertexMode, new GUIContent ("Show Normals"));
data.showBezierPathInVertexMode = GUILayout.Toggle (data.showBezierPathInVertexMode, new GUIContent ("Show Bezier Path"));
if (check.changed) {
SceneView.RepaintAll ();
EditorApplication.QueuePlayerLoopUpdate ();
}
}
DrawGlobalDisplaySettingsInspector ();
}
}
void DrawGlobalDisplaySettingsInspector () {
using (var check = new EditorGUI.ChangeCheckScope ()) {
data.globalDisplaySettingsFoldout = EditorGUILayout.InspectorTitlebar (data.globalDisplaySettingsFoldout, globalDisplaySettings);
if (data.globalDisplaySettingsFoldout) {
CreateCachedEditor (globalDisplaySettings, null, ref globalDisplaySettingsEditor);
globalDisplaySettingsEditor.OnInspectorGUI ();
}
if (check.changed) {
UpdateGlobalDisplaySettings ();
SceneView.RepaintAll ();
}
}
}
#endregion
#region Scene GUI
void OnSceneGUI () {
if (!globalDisplaySettings.visibleBehindObjects) {
Handles.zTest = UnityEngine.Rendering.CompareFunction.LessEqual;
}
EventType eventType = Event.current.type;
using (var check = new EditorGUI.ChangeCheckScope ()) {
handlesStartCol = Handles.color;
switch (data.tabIndex) {
case bezierPathTab:
if (eventType != EventType.Repaint && eventType != EventType.Layout) {
ProcessBezierPathInput (Event.current);
}
DrawBezierPathSceneEditor ();
break;
case vertexPathTab:
if (eventType == EventType.Repaint) {
DrawVertexPathSceneEditor ();
}
break;
}
// Don't allow clicking over empty space to deselect the object
if (eventType == EventType.Layout) {
HandleUtility.AddDefaultControl (0);
}
if (check.changed) {
EditorApplication.QueuePlayerLoopUpdate ();
}
}
SetTransformState ();
}
void DrawVertexPathSceneEditor () {
Color bezierCol = globalDisplaySettings.bezierPath;
bezierCol.a *= .5f;
if (data.showBezierPathInVertexMode) {
for (int i = 0; i < bezierPath.NumSegments; i++) {
Vector3[] points = bezierPath.GetPointsInSegment (i);
for (int j = 0; j < points.Length; j++) {
points[j] = MathUtility.TransformPoint (points[j], creator.transform, bezierPath.Space);
}
Handles.DrawBezier (points[0], points[3], points[1], points[2], bezierCol, null, 2);
}
}
Handles.color = globalDisplaySettings.vertexPath;
for (int i = 0; i < creator.path.NumPoints; i++) {
int nextIndex = (i + 1) % creator.path.NumPoints;
if (nextIndex != 0 || bezierPath.IsClosed) {
Handles.DrawLine (creator.path.GetPoint (i), creator.path.GetPoint (nextIndex));
}
}
if (data.showNormalsInVertexMode) {
Handles.color = globalDisplaySettings.normals;
Vector3[] normalLines = new Vector3[creator.path.NumPoints * 2];
for (int i = 0; i < creator.path.NumPoints; i++) {
normalLines[i * 2] = creator.path.GetPoint (i);
normalLines[i * 2 + 1] = creator.path.GetPoint (i) + creator.path.localNormals[i] * globalDisplaySettings.normalsLength;
}
Handles.DrawLines (normalLines);
}
}
void ProcessBezierPathInput (Event e) {
// Find which handle mouse is over. Start by looking at previous handle index first, as most likely to still be closest to mouse
int previousMouseOverHandleIndex = (mouseOverHandleIndex == -1) ? 0 : mouseOverHandleIndex;
mouseOverHandleIndex = -1;
for (int i = 0; i < bezierPath.NumPoints; i += 3) {
int handleIndex = (previousMouseOverHandleIndex + i) % bezierPath.NumPoints;
float handleRadius = GetHandleDiameter (globalDisplaySettings.anchorSize * data.bezierHandleScale, bezierPath[handleIndex]) / 2f;
Vector3 pos = MathUtility.TransformPoint (bezierPath[handleIndex], creator.transform, bezierPath.Space);
float dst = HandleUtility.DistanceToCircle (pos, handleRadius);
if (dst == 0) {
mouseOverHandleIndex = handleIndex;
break;
}
}
// Shift-left click (when mouse not over a handle) to split or add segment
if (mouseOverHandleIndex == -1) {
if (e.type == EventType.MouseDown && e.button == 0 && e.shift) {
UpdatePathMouseInfo ();
// Insert point along selected segment
if (selectedSegmentIndex != -1 && selectedSegmentIndex < bezierPath.NumSegments) {
Vector3 newPathPoint = pathMouseInfo.closestWorldPointToMouse;
newPathPoint = MathUtility.InverseTransformPoint (newPathPoint, creator.transform, bezierPath.Space);
Undo.RecordObject (creator, "Split segment");
bezierPath.SplitSegment (newPathPoint, selectedSegmentIndex, pathMouseInfo.timeOnBezierSegment);
}
// If path is not a closed loop, add new point on to the end of the path
else if (!bezierPath.IsClosed) {
// insert new point at same dst from scene camera as the point that comes before it (for a 3d path)
float dstCamToEndpoint = (Camera.current.transform.position - bezierPath[bezierPath.NumPoints - 1]).magnitude;
Vector3 newPathPoint = MouseUtility.GetMouseWorldPosition (bezierPath.Space, dstCamToEndpoint);
newPathPoint = MathUtility.InverseTransformPoint (newPathPoint, creator.transform, bezierPath.Space);
Undo.RecordObject (creator, "Add segment");
if (e.control || e.command) {
bezierPath.AddSegmentToStart (newPathPoint);
} else {
bezierPath.AddSegmentToEnd (newPathPoint);
}
}
}
}
// Control click or backspace/delete to remove point
if (e.keyCode == KeyCode.Backspace || e.keyCode == KeyCode.Delete || ((e.control || e.command) && e.type == EventType.MouseDown && e.button == 0)) {
if (mouseOverHandleIndex != -1) {
Undo.RecordObject (creator, "Delete segment");
bezierPath.DeleteSegment (mouseOverHandleIndex);
if (mouseOverHandleIndex == handleIndexToDisplayAsTransform) {
handleIndexToDisplayAsTransform = -1;
}
mouseOverHandleIndex = -1;
Repaint ();
}
}
// Holding shift and moving mouse (but mouse not over a handle/dragging a handle)
if (draggingHandleIndex == -1 && mouseOverHandleIndex == -1) {
bool shiftDown = e.shift && !shiftLastFrame;
if (shiftDown || ((e.type == EventType.MouseMove || e.type == EventType.MouseDrag) && e.shift)) {
UpdatePathMouseInfo ();
if (pathMouseInfo.mouseDstToLine < segmentSelectDistanceThreshold) {
if (pathMouseInfo.closestSegmentIndex != selectedSegmentIndex) {
selectedSegmentIndex = pathMouseInfo.closestSegmentIndex;
HandleUtility.Repaint ();
}
} else {
selectedSegmentIndex = -1;
HandleUtility.Repaint ();
}
}
}
shiftLastFrame = e.shift;
}
void DrawBezierPathSceneEditor () {
bool displayControlPoints = data.displayControlPoints && (bezierPath.ControlPointMode != BezierPath.ControlMode.Automatic || !globalDisplaySettings.hideAutoControls);
Bounds bounds = bezierPath.CalculateBoundsWithTransform (creator.transform);
if (Event.current.type == EventType.Repaint) {
for (int i = 0; i < bezierPath.NumSegments; i++) {
Vector3[] points = bezierPath.GetPointsInSegment (i);
for (int j = 0; j < points.Length; j++) {
points[j] = MathUtility.TransformPoint (points[j], creator.transform, bezierPath.Space);
}
if (data.showPerSegmentBounds) {
Bounds segmentBounds = CubicBezierUtility.CalculateSegmentBounds (points[0], points[1], points[2], points[3]);
Handles.color = globalDisplaySettings.segmentBounds;
Handles.DrawWireCube (segmentBounds.center, segmentBounds.size);
}
// Draw lines between control points
if (displayControlPoints) {
Handles.color = (bezierPath.ControlPointMode == BezierPath.ControlMode.Automatic) ? globalDisplaySettings.handleDisabled : globalDisplaySettings.controlLine;
Handles.DrawLine (points[1], points[0]);
Handles.DrawLine (points[2], points[3]);
}
// Draw path
bool highlightSegment = (i == selectedSegmentIndex && Event.current.shift && draggingHandleIndex == -1 && mouseOverHandleIndex == -1);
Color segmentCol = (highlightSegment) ? globalDisplaySettings.highlightedPath : globalDisplaySettings.bezierPath;
Handles.DrawBezier (points[0], points[3], points[1], points[2], segmentCol, null, 2);
}
if (data.showPathBounds) {
Handles.color = globalDisplaySettings.bounds;
Handles.DrawWireCube (bounds.center, bounds.size);
}
// Draw normals
if (data.showNormals) {
if (!hasUpdatedNormalsVertexPath) {
normalsVertexPath = new VertexPath (bezierPath, creator.transform, normalsSpacing);
hasUpdatedNormalsVertexPath = true;
}
if (editingNormalsOld != data.showNormals) {
editingNormalsOld = data.showNormals;
Repaint ();
}
Vector3[] normalLines = new Vector3[normalsVertexPath.NumPoints * 2];
Handles.color = globalDisplaySettings.normals;
for (int i = 0; i < normalsVertexPath.NumPoints; i++) {
normalLines[i * 2] = normalsVertexPath.GetPoint (i);
normalLines[i * 2 + 1] = normalsVertexPath.GetPoint (i) + normalsVertexPath.GetNormal (i) * globalDisplaySettings.normalsLength;
}
Handles.DrawLines (normalLines);
}
}
if (data.displayAnchorPoints) {
for (int i = 0; i < bezierPath.NumPoints; i += 3) {
DrawHandle (i);
}
}
if (displayControlPoints) {
for (int i = 1; i < bezierPath.NumPoints - 1; i += 3) {
DrawHandle (i);
DrawHandle (i + 1);
}
}
}
void DrawHandle (int i) {
Vector3 handlePosition = MathUtility.TransformPoint (bezierPath[i], creator.transform, bezierPath.Space);
float anchorHandleSize = GetHandleDiameter (globalDisplaySettings.anchorSize * data.bezierHandleScale, bezierPath[i]);
float controlHandleSize = GetHandleDiameter (globalDisplaySettings.controlSize * data.bezierHandleScale, bezierPath[i]);
bool isAnchorPoint = i % 3 == 0;
bool isInteractive = isAnchorPoint || bezierPath.ControlPointMode != BezierPath.ControlMode.Automatic;
float handleSize = (isAnchorPoint) ? anchorHandleSize : controlHandleSize;
bool doTransformHandle = i == handleIndexToDisplayAsTransform;
PathHandle.HandleColours handleColours = (isAnchorPoint) ? splineAnchorColours : splineControlColours;
if (i == handleIndexToDisplayAsTransform) {
handleColours.defaultColour = (isAnchorPoint) ? globalDisplaySettings.anchorSelected : globalDisplaySettings.controlSelected;
}
var cap = capFunctions[(isAnchorPoint) ? globalDisplaySettings.anchorShape : globalDisplaySettings.controlShape];
PathHandle.HandleInputType handleInputType;
handlePosition = PathHandle.DrawHandle (handlePosition, bezierPath.Space, isInteractive, handleSize, cap, handleColours, out handleInputType, i);
if (doTransformHandle) {
// Show normals rotate tool
if (data.showNormals && Tools.current == Tool.Rotate && isAnchorPoint && bezierPath.Space == PathSpace.xyz) {
Handles.color = handlesStartCol;
int attachedControlIndex = (i == bezierPath.NumPoints - 1) ? i - 1 : i + 1;
Vector3 dir = (bezierPath[attachedControlIndex] - handlePosition).normalized;
float handleRotOffset = (360 + bezierPath.GlobalNormalsAngle) % 360;
anchorAngleHandle.radius = handleSize * 3;
anchorAngleHandle.angle = handleRotOffset + bezierPath.GetAnchorNormalAngle (i / 3);
Vector3 handleDirection = Vector3.Cross (dir, Vector3.up);
Matrix4x4 handleMatrix = Matrix4x4.TRS (
handlePosition,
Quaternion.LookRotation (handleDirection, dir),
Vector3.one
);
using (new Handles.DrawingScope (handleMatrix)) {
// draw the handle
EditorGUI.BeginChangeCheck ();
anchorAngleHandle.DrawHandle ();
if (EditorGUI.EndChangeCheck ()) {
Undo.RecordObject (creator, "Set angle");
bezierPath.SetAnchorNormalAngle (i / 3, anchorAngleHandle.angle - handleRotOffset);
}
}
} else {
handlePosition = Handles.DoPositionHandle (handlePosition, Quaternion.identity);
}
}
switch (handleInputType) {
case PathHandle.HandleInputType.LMBDrag:
draggingHandleIndex = i;
handleIndexToDisplayAsTransform = -1;
Repaint ();
break;
case PathHandle.HandleInputType.LMBRelease:
draggingHandleIndex = -1;
handleIndexToDisplayAsTransform = -1;
Repaint ();
break;
case PathHandle.HandleInputType.LMBClick:
draggingHandleIndex = -1;
if (Event.current.shift) {
handleIndexToDisplayAsTransform = -1; // disable move tool if new point added
} else {
if (handleIndexToDisplayAsTransform == i) {
handleIndexToDisplayAsTransform = -1; // disable move tool if clicking on point under move tool
} else {
handleIndexToDisplayAsTransform = i;
}
}
Repaint ();
break;
case PathHandle.HandleInputType.LMBPress:
if (handleIndexToDisplayAsTransform != i) {
handleIndexToDisplayAsTransform = -1;
Repaint ();
}
break;
}
Vector3 localHandlePosition = MathUtility.InverseTransformPoint (handlePosition, creator.transform, bezierPath.Space);
if (bezierPath[i] != localHandlePosition) {
Undo.RecordObject (creator, "Move point");
bezierPath.MovePoint (i, localHandlePosition);
}
}
#endregion
#region Internal methods
void OnDisable () {
Tools.hidden = false;
}
void OnEnable () {
creator = (PathCreator) target;
bool in2DEditorMode = EditorSettings.defaultBehaviorMode == EditorBehaviorMode.Mode2D;
creator.InitializeEditorData (in2DEditorMode);
data.bezierCreated -= ResetState;
data.bezierCreated += ResetState;
Undo.undoRedoPerformed -= OnUndoRedo;
Undo.undoRedoPerformed += OnUndoRedo;
LoadDisplaySettings ();
UpdateGlobalDisplaySettings ();
ResetState ();
SetTransformState (true);
}
void SetTransformState (bool initialize = false) {
Transform t = creator.transform;
if (!initialize) {
if (transformPos != t.position || t.localScale != transformScale || t.rotation != transformRot) {
data.PathTransformed ();
}
}
transformPos = t.position;
transformScale = t.localScale;
transformRot = t.rotation;
}
void OnUndoRedo () {
hasUpdatedScreenSpaceLine = false;
hasUpdatedNormalsVertexPath = false;
selectedSegmentIndex = -1;
Repaint ();
}
void TabChanged () {
SceneView.RepaintAll ();
RepaintUnfocusedSceneViews ();
}
void LoadDisplaySettings () {
globalDisplaySettings = GlobalDisplaySettings.Load ();
capFunctions = new Dictionary<GlobalDisplaySettings.HandleType, Handles.CapFunction> ();
capFunctions.Add (GlobalDisplaySettings.HandleType.Circle, Handles.CylinderHandleCap);
capFunctions.Add (GlobalDisplaySettings.HandleType.Sphere, Handles.SphereHandleCap);
capFunctions.Add (GlobalDisplaySettings.HandleType.Square, Handles.CubeHandleCap);
}
void UpdateGlobalDisplaySettings () {
var gds = globalDisplaySettings;
splineAnchorColours = new PathHandle.HandleColours (gds.anchor, gds.anchorHighlighted, gds.anchorSelected, gds.handleDisabled);
splineControlColours = new PathHandle.HandleColours (gds.control, gds.controlHighlighted, gds.controlSelected, gds.handleDisabled);
anchorAngleHandle.fillColor = new Color (1, 1, 1, .05f);
anchorAngleHandle.wireframeColor = Color.grey;
anchorAngleHandle.radiusHandleColor = Color.clear;
anchorAngleHandle.angleHandleColor = Color.white;
}
void ResetState () {
selectedSegmentIndex = -1;
draggingHandleIndex = -1;
mouseOverHandleIndex = -1;
handleIndexToDisplayAsTransform = -1;
hasUpdatedScreenSpaceLine = false;
hasUpdatedNormalsVertexPath = false;
bezierPath.OnModified -= OnPathModifed;
bezierPath.OnModified += OnPathModifed;
SceneView.RepaintAll ();
EditorApplication.QueuePlayerLoopUpdate ();
}
void OnPathModifed () {
hasUpdatedScreenSpaceLine = false;
hasUpdatedNormalsVertexPath = false;
RepaintUnfocusedSceneViews ();
}
void RepaintUnfocusedSceneViews () {
// If multiple scene views are open, repaint those which do not have focus.
if (SceneView.sceneViews.Count > 1) {
foreach (SceneView sv in SceneView.sceneViews) {
if (EditorWindow.focusedWindow != (EditorWindow) sv) {
sv.Repaint ();
}
}
}
}
void UpdatePathMouseInfo () {
if (!hasUpdatedScreenSpaceLine || (screenSpaceLine != null && screenSpaceLine.TransformIsOutOfDate ())) {
screenSpaceLine = new ScreenSpacePolyLine (bezierPath, creator.transform, screenPolylineMaxAngleError, screenPolylineMinVertexDst);
hasUpdatedScreenSpaceLine = true;
}
pathMouseInfo = screenSpaceLine.CalculateMouseInfo ();
}
float GetHandleDiameter (float diameter, Vector3 handlePosition) {
float scaledDiameter = diameter * constantHandleScale;
if (data.keepConstantHandleSize) {
scaledDiameter *= HandleUtility.GetHandleSize (handlePosition) * 2.5f;
}
return scaledDiameter;
}
BezierPath bezierPath {
get {
return data.bezierPath;
}
}
PathCreatorData data {
get {
return creator.EditorData;
}
}
bool editingNormals {
get {
return Tools.current == Tool.Rotate && handleIndexToDisplayAsTransform % 3 == 0 && bezierPath.Space == PathSpace.xyz;
}
}
#endregion
}
}

View File

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 45d81a20743ff42a3b0dfbd499d4797e
timeCreated: 1516864234
licenseType: Store
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c62dae0f992c5174a951248617cc5720
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2b76edb14a39ed944b9c906e5f1d3aaa
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,678 @@
using System.Collections.Generic;
using System.Linq;
using PathCreation.Utility;
using UnityEngine;
namespace PathCreation {
/// A bezier path is a path made by stitching together any number of (cubic) bezier curves.
/// A single cubic bezier curve is defined by 4 points: anchor1, control1, control2, anchor2
/// The curve moves between the 2 anchors, and the shape of the curve is affected by the positions of the 2 control points
/// When two curves are stitched together, they share an anchor point (end anchor of curve 1 = start anchor of curve 2).
/// So while one curve alone consists of 4 points, two curves are defined by 7 unique points.
/// Apart from storing the points, this class also provides methods for working with the path.
/// For example, adding, inserting, and deleting points.
[System.Serializable]
public class BezierPath {
public event System.Action OnModified;
public enum ControlMode { Aligned, Mirrored, Free, Automatic };
#region Fields
[SerializeField, HideInInspector]
List<Vector3> points;
[SerializeField, HideInInspector]
bool isClosed;
[SerializeField, HideInInspector]
PathSpace space;
[SerializeField, HideInInspector]
ControlMode controlMode;
[SerializeField, HideInInspector]
float autoControlLength = .3f;
[SerializeField, HideInInspector]
bool boundsUpToDate;
[SerializeField, HideInInspector]
Bounds bounds;
// Normals settings
[SerializeField, HideInInspector]
List<float> perAnchorNormalsAngle;
[SerializeField, HideInInspector]
float globalNormalsAngle;
[SerializeField, HideInInspector]
bool flipNormals;
#endregion
#region Constructors
/// <summary> Creates a two-anchor path centred around the given centre point </summary>
///<param name="isClosed"> Should the end point connect back to the start point? </param>
///<param name="space"> Determines if the path is in 3d space, or clamped to the xy/xz plane </param>
public BezierPath (Vector3 centre, bool isClosed = false, PathSpace space = PathSpace.xyz) {
Vector3 dir = (space == PathSpace.xz) ? Vector3.forward : Vector3.up;
float width = 2;
float controlHeight = .5f;
float controlWidth = 1f;
points = new List<Vector3> {
centre + Vector3.left * width,
centre + Vector3.left * controlWidth + dir * controlHeight,
centre + Vector3.right * controlWidth - dir * controlHeight,
centre + Vector3.right * width
};
perAnchorNormalsAngle = new List<float> () { 0, 0 };
Space = space;
IsClosed = isClosed;
}
/// <summary> Creates a path from the supplied 3D points </summary>
///<param name="points"> List or array of points to create the path from. </param>
///<param name="isClosed"> Should the end point connect back to the start point? </param>
///<param name="space"> Determines if the path is in 3d space, or clamped to the xy/xz plane </param>
public BezierPath (IEnumerable<Vector3> points, bool isClosed = false, PathSpace space = PathSpace.xyz) {
Vector3[] pointsArray = points.ToArray ();
if (pointsArray.Length < 2) {
Debug.LogError ("Path requires at least 2 anchor points.");
} else {
controlMode = ControlMode.Automatic;
this.points = new List<Vector3> { pointsArray[0], Vector3.zero, Vector3.zero, pointsArray[1] };
perAnchorNormalsAngle = new List<float> (new float[] { 0, 0 });
for (int i = 2; i < pointsArray.Length; i++) {
AddSegmentToEnd (pointsArray[i]);
perAnchorNormalsAngle.Add (0);
}
}
this.Space = space;
this.IsClosed = isClosed;
}
/// <summary> Creates a path from the positions of the supplied 2D points </summary>
///<param name="transforms"> List or array of transforms to create the path from. </param>
///<param name="isClosed"> Should the end point connect back to the start point? </param>
///<param name="space"> Determines if the path is in 3d space, or clamped to the xy/xz plane </param>
public BezierPath (IEnumerable<Vector2> transforms, bool isClosed = false, PathSpace space = PathSpace.xy):
this (transforms.Select (p => new Vector3 (p.x, p.y)), isClosed, space) { }
/// <summary> Creates a path from the positions of the supplied transforms </summary>
///<param name="transforms"> List or array of transforms to create the path from. </param>
///<param name="isClosed"> Should the end point connect back to the start point? </param>
///<param name="space"> Determines if the path is in 3d space, or clamped to the xy/xz plane </param>
public BezierPath (IEnumerable<Transform> transforms, bool isClosed = false, PathSpace space = PathSpace.xy):
this (transforms.Select (t => t.position), isClosed, space) { }
/// <summary> Creates a path from the supplied 2D points </summary>
///<param name="points"> List or array of 2d points to create the path from. </param>
///<param name="isClosed"> Should the end point connect back to the start point? </param>
///<param name="pathSpace"> Determines if the path is in 3d space, or clamped to the xy/xz plane </param>
public BezierPath (IEnumerable<Vector2> points, PathSpace space = PathSpace.xyz, bool isClosed = false):
this (points.Select (p => new Vector3 (p.x, p.y)), isClosed, space) { }
#endregion
#region Public methods and accessors
/// Get world space position of point
public Vector3 this [int i] {
get {
return GetPoint (i);
}
}
/// Get world space position of point
public Vector3 GetPoint (int i) {
return points[i];
}
/// Get world space position of point
public void SetPoint (int i, Vector3 localPosition, bool suppressPathModifiedEvent = false) {
points[i] = localPosition;
if (!suppressPathModifiedEvent) {
NotifyPathModified();
}
}
/// Total number of points in the path (anchors and controls)
public int NumPoints {
get {
return points.Count;
}
}
/// Number of anchor points making up the path
public int NumAnchorPoints {
get {
return (IsClosed) ? points.Count / 3 : (points.Count + 2) / 3;
}
}
/// Number of bezier curves making up this path
public int NumSegments {
get {
return points.Count / 3;
}
}
/// Path can exist in 3D (xyz), 2D (xy), or Top-Down (xz) space
/// In xy or xz space, points will be clamped to that plane (so in a 2D path, for example, points will always be at 0 on z axis)
public PathSpace Space {
get {
return space;
}
set {
if (value != space) {
PathSpace previousSpace = space;
space = value;
UpdateToNewPathSpace (previousSpace);
}
}
}
/// If closed, path will loop back from end point to start point
public bool IsClosed {
get {
return isClosed;
}
set {
if (isClosed != value) {
isClosed = value;
UpdateClosedState ();
}
}
}
/// The control mode determines the behaviour of control points.
/// Possible modes are:
/// Aligned = controls stay in straight line around their anchor
/// Mirrored = controls stay in straight, equidistant line around their anchor
/// Free = no constraints (use this if sharp corners are needed)
/// Automatic = controls placed automatically to try make the path smooth
public ControlMode ControlPointMode {
get {
return controlMode;
}
set {
if (controlMode != value) {
controlMode = value;
if (controlMode == ControlMode.Automatic) {
AutoSetAllControlPoints ();
NotifyPathModified ();
}
}
}
}
/// When using automatic control point placement, this value scales how far apart controls are placed
public float AutoControlLength {
get {
return autoControlLength;
}
set {
value = Mathf.Max (value, .01f);
if (autoControlLength != value) {
autoControlLength = value;
AutoSetAllControlPoints ();
NotifyPathModified ();
}
}
}
/// Add new anchor point to end of the path
public void AddSegmentToEnd (Vector3 anchorPos) {
if (isClosed) {
return;
}
int lastAnchorIndex = points.Count - 1;
// Set position for new control to be mirror of its counterpart
Vector3 secondControlForOldLastAnchorOffset = (points[lastAnchorIndex] - points[lastAnchorIndex - 1]);
if (controlMode != ControlMode.Mirrored && controlMode != ControlMode.Automatic) {
// Set position for new control to be aligned with its counterpart, but with a length of half the distance from prev to new anchor
float dstPrevToNewAnchor = (points[lastAnchorIndex] - anchorPos).magnitude;
secondControlForOldLastAnchorOffset = (points[lastAnchorIndex] - points[lastAnchorIndex - 1]).normalized * dstPrevToNewAnchor * .5f;
}
Vector3 secondControlForOldLastAnchor = points[lastAnchorIndex] + secondControlForOldLastAnchorOffset;
Vector3 controlForNewAnchor = (anchorPos + secondControlForOldLastAnchor) * .5f;
points.Add (secondControlForOldLastAnchor);
points.Add (controlForNewAnchor);
points.Add (anchorPos);
perAnchorNormalsAngle.Add (perAnchorNormalsAngle[perAnchorNormalsAngle.Count - 1]);
if (controlMode == ControlMode.Automatic) {
AutoSetAllAffectedControlPoints (points.Count - 1);
}
NotifyPathModified ();
}
/// Add new anchor point to start of the path
public void AddSegmentToStart (Vector3 anchorPos) {
if (isClosed) {
return;
}
// Set position for new control to be mirror of its counterpart
Vector3 secondControlForOldFirstAnchorOffset = (points[0] - points[1]);
if (controlMode != ControlMode.Mirrored && controlMode != ControlMode.Automatic) {
// Set position for new control to be aligned with its counterpart, but with a length of half the distance from prev to new anchor
float dstPrevToNewAnchor = (points[0] - anchorPos).magnitude;
secondControlForOldFirstAnchorOffset = secondControlForOldFirstAnchorOffset.normalized * dstPrevToNewAnchor * .5f;
}
Vector3 secondControlForOldFirstAnchor = points[0] + secondControlForOldFirstAnchorOffset;
Vector3 controlForNewAnchor = (anchorPos + secondControlForOldFirstAnchor) * .5f;
points.Insert (0, anchorPos);
points.Insert (1, controlForNewAnchor);
points.Insert (2, secondControlForOldFirstAnchor);
perAnchorNormalsAngle.Insert (0, perAnchorNormalsAngle[0]);
if (controlMode == ControlMode.Automatic) {
AutoSetAllAffectedControlPoints (0);
}
NotifyPathModified ();
}
/// Insert new anchor point at given position. Automatically place control points around it so as to keep shape of curve the same
public void SplitSegment (Vector3 anchorPos, int segmentIndex, float splitTime) {
splitTime = Mathf.Clamp01 (splitTime);
if (controlMode == ControlMode.Automatic) {
points.InsertRange (segmentIndex * 3 + 2, new Vector3[] { Vector3.zero, anchorPos, Vector3.zero });
AutoSetAllAffectedControlPoints (segmentIndex * 3 + 3);
} else {
// Split the curve to find where control points can be inserted to least affect shape of curve
// Curve will probably be deformed slightly since splitTime is only an estimate (for performance reasons, and so doesn't correspond exactly with anchorPos)
Vector3[][] splitSegment = CubicBezierUtility.SplitCurve (GetPointsInSegment (segmentIndex), splitTime);
points.InsertRange (segmentIndex * 3 + 2, new Vector3[] { splitSegment[0][2], splitSegment[1][0], splitSegment[1][1] });
int newAnchorIndex = segmentIndex * 3 + 3;
MovePoint (newAnchorIndex - 2, splitSegment[0][1], true);
MovePoint (newAnchorIndex + 2, splitSegment[1][2], true);
MovePoint (newAnchorIndex, anchorPos, true);
if (controlMode == ControlMode.Mirrored) {
float avgDst = ((splitSegment[0][2] - anchorPos).magnitude + (splitSegment[1][1] - anchorPos).magnitude) / 2;
MovePoint (newAnchorIndex + 1, anchorPos + (splitSegment[1][1] - anchorPos).normalized * avgDst, true);
}
}
// Insert angle for new anchor (value should be set inbetween neighbour anchor angles)
int newAnchorAngleIndex = (segmentIndex + 1) % perAnchorNormalsAngle.Count;
int numAngles = perAnchorNormalsAngle.Count;
float anglePrev = perAnchorNormalsAngle[segmentIndex];
float angleNext = perAnchorNormalsAngle[newAnchorAngleIndex];
float splitAngle = Mathf.LerpAngle (anglePrev, angleNext, splitTime);
perAnchorNormalsAngle.Insert (newAnchorAngleIndex, splitAngle);
NotifyPathModified ();
}
/// Delete the anchor point at given index, as well as its associated control points
public void DeleteSegment (int anchorIndex) {
// Don't delete segment if its the last one remaining (or if only two segments in a closed path)
if (NumSegments > 2 || !isClosed && NumSegments > 1) {
if (anchorIndex == 0) {
if (isClosed) {
points[points.Count - 1] = points[2];
}
points.RemoveRange (0, 3);
} else if (anchorIndex == points.Count - 1 && !isClosed) {
points.RemoveRange (anchorIndex - 2, 3);
} else {
points.RemoveRange (anchorIndex - 1, 3);
}
perAnchorNormalsAngle.RemoveAt (anchorIndex / 3);
if (controlMode == ControlMode.Automatic) {
AutoSetAllControlPoints ();
}
NotifyPathModified ();
}
}
/// Returns an array of the 4 points making up the segment (anchor1, control1, control2, anchor2)
public Vector3[] GetPointsInSegment (int segmentIndex) {
segmentIndex = Mathf.Clamp (segmentIndex, 0, NumSegments - 1);
return new Vector3[] { this [segmentIndex * 3], this [segmentIndex * 3 + 1], this [segmentIndex * 3 + 2], this [LoopIndex (segmentIndex * 3 + 3)] };
}
/// Move an existing point to a new position
public void MovePoint (int i, Vector3 pointPos, bool suppressPathModifiedEvent = false) {
if (space == PathSpace.xy) {
pointPos.z = 0;
} else if (space == PathSpace.xz) {
pointPos.y = 0;
}
Vector3 deltaMove = pointPos - points[i];
bool isAnchorPoint = i % 3 == 0;
// Don't process control point if control mode is set to automatic
if (isAnchorPoint || controlMode != ControlMode.Automatic) {
points[i] = pointPos;
if (controlMode == ControlMode.Automatic) {
AutoSetAllAffectedControlPoints (i);
} else {
// Move control points with anchor point
if (isAnchorPoint) {
if (i + 1 < points.Count || isClosed) {
points[LoopIndex (i + 1)] += deltaMove;
}
if (i - 1 >= 0 || isClosed) {
points[LoopIndex (i - 1)] += deltaMove;
}
}
// If not in free control mode, then move attached control point to be aligned/mirrored (depending on mode)
else if (controlMode != ControlMode.Free) {
bool nextPointIsAnchor = (i + 1) % 3 == 0;
int attachedControlIndex = (nextPointIsAnchor) ? i + 2 : i - 2;
int anchorIndex = (nextPointIsAnchor) ? i + 1 : i - 1;
if (attachedControlIndex >= 0 && attachedControlIndex < points.Count || isClosed) {
float distanceFromAnchor = 0;
// If in aligned mode, then attached control's current distance from anchor point should be maintained
if (controlMode == ControlMode.Aligned) {
distanceFromAnchor = (points[LoopIndex (anchorIndex)] - points[LoopIndex (attachedControlIndex)]).magnitude;
}
// If in mirrored mode, then both control points should have the same distance from the anchor point
else if (controlMode == ControlMode.Mirrored) {
distanceFromAnchor = (points[LoopIndex (anchorIndex)] - points[i]).magnitude;
}
Vector3 dir = (points[LoopIndex (anchorIndex)] - pointPos).normalized;
points[LoopIndex (attachedControlIndex)] = points[LoopIndex (anchorIndex)] + dir * distanceFromAnchor;
}
}
}
if (!suppressPathModifiedEvent) {
NotifyPathModified ();
}
}
}
/// Update the bounding box of the path
public Bounds CalculateBoundsWithTransform (Transform transform) {
// Loop through all segments and keep track of the minmax points of all their bounding boxes
MinMax3D minMax = new MinMax3D ();
for (int i = 0; i < NumSegments; i++) {
Vector3[] p = GetPointsInSegment (i);
for (int j = 0; j < p.Length; j++) {
p[j] = MathUtility.TransformPoint (p[j], transform, space);
}
minMax.AddValue (p[0]);
minMax.AddValue (p[3]);
List<float> extremePointTimes = CubicBezierUtility.ExtremePointTimes (p[0], p[1], p[2], p[3]);
foreach (float t in extremePointTimes) {
minMax.AddValue (CubicBezierUtility.EvaluateCurve (p, t));
}
}
return new Bounds ((minMax.Min + minMax.Max) / 2, minMax.Max - minMax.Min);
}
/// Flip the normal vectors 180 degrees
public bool FlipNormals {
get {
return flipNormals;
}
set {
if (flipNormals != value) {
flipNormals = value;
NotifyPathModified ();
}
}
}
/// Global angle that all normal vectors are rotated by (only relevant for paths in 3D space)
public float GlobalNormalsAngle {
get {
return globalNormalsAngle;
}
set {
if (value != globalNormalsAngle) {
globalNormalsAngle = value;
NotifyPathModified ();
}
}
}
/// Get the desired angle of the normal vector at a particular anchor (only relevant for paths in 3D space)
public float GetAnchorNormalAngle (int anchorIndex) {
return perAnchorNormalsAngle[anchorIndex] % 360;
}
/// Set the desired angle of the normal vector at a particular anchor (only relevant for paths in 3D space)
public void SetAnchorNormalAngle (int anchorIndex, float angle) {
angle = (angle + 360) % 360;
if (perAnchorNormalsAngle[anchorIndex] != angle) {
perAnchorNormalsAngle[anchorIndex] = angle;
NotifyPathModified ();
}
}
/// Reset global and anchor normal angles to 0
public void ResetNormalAngles () {
for (int i = 0; i < perAnchorNormalsAngle.Count; i++) {
perAnchorNormalsAngle[i] = 0;
}
globalNormalsAngle = 0;
NotifyPathModified ();
}
/// Bounding box containing the path
public Bounds PathBounds {
get {
if (!boundsUpToDate) {
UpdateBounds ();
}
return bounds;
}
}
#endregion
#region Internal methods and accessors
/// Update the bounding box of the path
void UpdateBounds () {
if (boundsUpToDate) {
return;
}
// Loop through all segments and keep track of the minmax points of all their bounding boxes
MinMax3D minMax = new MinMax3D ();
for (int i = 0; i < NumSegments; i++) {
Vector3[] p = GetPointsInSegment (i);
minMax.AddValue (p[0]);
minMax.AddValue (p[3]);
List<float> extremePointTimes = CubicBezierUtility.ExtremePointTimes (p[0], p[1], p[2], p[3]);
foreach (float t in extremePointTimes) {
minMax.AddValue (CubicBezierUtility.EvaluateCurve (p, t));
}
}
boundsUpToDate = true;
bounds = new Bounds ((minMax.Min + minMax.Max) / 2, minMax.Max - minMax.Min);
}
/// Determines good positions (for a smooth path) for the control points affected by a moved/inserted anchor point
void AutoSetAllAffectedControlPoints (int updatedAnchorIndex) {
for (int i = updatedAnchorIndex - 3; i <= updatedAnchorIndex + 3; i += 3) {
if (i >= 0 && i < points.Count || isClosed) {
AutoSetAnchorControlPoints (LoopIndex (i));
}
}
AutoSetStartAndEndControls ();
}
/// Determines good positions (for a smooth path) for all control points
void AutoSetAllControlPoints () {
if (NumAnchorPoints > 2) {
for (int i = 0; i < points.Count; i += 3) {
AutoSetAnchorControlPoints (i);
}
}
AutoSetStartAndEndControls ();
}
/// Calculates good positions (to result in smooth path) for the controls around specified anchor
void AutoSetAnchorControlPoints (int anchorIndex) {
// Calculate a vector that is perpendicular to the vector bisecting the angle between this anchor and its two immediate neighbours
// The control points will be placed along that vector
Vector3 anchorPos = points[anchorIndex];
Vector3 dir = Vector3.zero;
float[] neighbourDistances = new float[2];
if (anchorIndex - 3 >= 0 || isClosed) {
Vector3 offset = points[LoopIndex (anchorIndex - 3)] - anchorPos;
dir += offset.normalized;
neighbourDistances[0] = offset.magnitude;
}
if (anchorIndex + 3 >= 0 || isClosed) {
Vector3 offset = points[LoopIndex (anchorIndex + 3)] - anchorPos;
dir -= offset.normalized;
neighbourDistances[1] = -offset.magnitude;
}
dir.Normalize ();
// Set the control points along the calculated direction, with a distance proportional to the distance to the neighbouring control point
for (int i = 0; i < 2; i++) {
int controlIndex = anchorIndex + i * 2 - 1;
if (controlIndex >= 0 && controlIndex < points.Count || isClosed) {
points[LoopIndex (controlIndex)] = anchorPos + dir * neighbourDistances[i] * autoControlLength;
}
}
}
/// Determines good positions (for a smooth path) for the control points at the start and end of a path
void AutoSetStartAndEndControls () {
if (isClosed) {
// Handle case with only 2 anchor points separately, as will otherwise result in straight line ()
if (NumAnchorPoints == 2) {
Vector3 dirAnchorAToB = (points[3] - points[0]).normalized;
float dstBetweenAnchors = (points[0] - points[3]).magnitude;
Vector3 perp = Vector3.Cross (dirAnchorAToB, (space == PathSpace.xy) ? Vector3.forward : Vector3.up);
points[1] = points[0] + perp * dstBetweenAnchors / 2f;
points[5] = points[0] - perp * dstBetweenAnchors / 2f;
points[2] = points[3] + perp * dstBetweenAnchors / 2f;
points[4] = points[3] - perp * dstBetweenAnchors / 2f;
} else {
AutoSetAnchorControlPoints (0);
AutoSetAnchorControlPoints (points.Count - 3);
}
} else {
// Handle case with 2 anchor points separately, as otherwise minor adjustments cause path to constantly flip
if (NumAnchorPoints == 2) {
points[1] = points[0] + (points[3] - points[0]) * .25f;
points[2] = points[3] + (points[0] - points[3]) * .25f;
} else {
points[1] = (points[0] + points[2]) * .5f;
points[points.Count - 2] = (points[points.Count - 1] + points[points.Count - 3]) * .5f;
}
}
}
/// Update point positions for new path space
/// (for example, if changing from xy to xz path, y and z axes will be swapped so the path keeps its shape in the new space)
void UpdateToNewPathSpace (PathSpace previousSpace) {
// If changing from 3d to 2d space, first find the bounds of the 3d path.
// The axis with the smallest bounds will be discarded.
if (previousSpace == PathSpace.xyz) {
Vector3 boundsSize = PathBounds.size;
float minBoundsSize = Mathf.Min (boundsSize.x, boundsSize.y, boundsSize.z);
for (int i = 0; i < NumPoints; i++) {
if (space == PathSpace.xy) {
float x = (minBoundsSize == boundsSize.x) ? points[i].z : points[i].x;
float y = (minBoundsSize == boundsSize.y) ? points[i].z : points[i].y;
points[i] = new Vector3 (x, y, 0);
} else if (space == PathSpace.xz) {
float x = (minBoundsSize == boundsSize.x) ? points[i].y : points[i].x;
float z = (minBoundsSize == boundsSize.z) ? points[i].y : points[i].z;
points[i] = new Vector3 (x, 0, z);
}
}
} else {
// Nothing needs to change when going to 3d space
if (space != PathSpace.xyz) {
for (int i = 0; i < NumPoints; i++) {
// from xz to xy
if (space == PathSpace.xy) {
points[i] = new Vector3 (points[i].x, points[i].z, 0);
}
// from xy to xz
else if (space == PathSpace.xz) {
points[i] = new Vector3 (points[i].x, 0, points[i].y);
}
}
}
}
NotifyPathModified ();
}
/// Add/remove the extra 2 controls required for a closed path
void UpdateClosedState () {
if (isClosed) {
// Set positions for new controls to mirror their counterparts
Vector3 lastAnchorSecondControl = points[points.Count - 1] * 2 - points[points.Count - 2];
Vector3 firstAnchorSecondControl = points[0] * 2 - points[1];
if (controlMode != ControlMode.Mirrored && controlMode != ControlMode.Automatic) {
// Set positions for new controls to be aligned with their counterparts, but with a length of half the distance between start/end anchor
float dstBetweenStartAndEndAnchors = (points[points.Count - 1] - points[0]).magnitude;
lastAnchorSecondControl = points[points.Count - 1] + (points[points.Count - 1] - points[points.Count - 2]).normalized * dstBetweenStartAndEndAnchors * .5f;
firstAnchorSecondControl = points[0] + (points[0] - points[1]).normalized * dstBetweenStartAndEndAnchors * .5f;
}
points.Add (lastAnchorSecondControl);
points.Add (firstAnchorSecondControl);
} else {
points.RemoveRange (points.Count - 2, 2);
}
if (controlMode == ControlMode.Automatic) {
AutoSetStartAndEndControls ();
}
if (OnModified != null) {
OnModified ();
}
}
/// Loop index around to start/end of points array if out of bounds (useful when working with closed paths)
int LoopIndex (int i) {
return (i + points.Count) % points.Count;
}
// Called when the path is modified
public void NotifyPathModified () {
boundsUpToDate = false;
if (OnModified != null) {
OnModified ();
}
}
#endregion
}
}

View File

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 756209f371f304fb1920c53a8a25a5e2
timeCreated: 1516786483
licenseType: Store
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,3 @@
namespace PathCreation {
public enum EndOfPathInstruction {Loop, Reverse, Stop};
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c0d7fa70c03166e4180909b6e5d546c7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,70 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace PathCreation
{
//[CreateAssetMenu()]
public class GlobalDisplaySettings : ScriptableObject
{
public enum HandleType { Sphere, Circle, Square };
[Header("Appearance")]
public float anchorSize = 10;
public float controlSize = 7f;
[Tooltip("Should the path still be drawn when behind objects in the scene?")]
public bool visibleBehindObjects = true;
[Tooltip("Should the path be drawn even when the path object is not selected?")]
public bool visibleWhenNotSelected = true;
[Tooltip("If true, control points will be hidden when the control point mode is set to automatic. Otherwise they will inactive, but still visible.")]
public bool hideAutoControls = true;
public HandleType anchorShape;
public HandleType controlShape;
[Header("Anchor Colours")]
public Color anchor = new Color(0.95f, 0.25f, 0.25f, 0.85f);
public Color anchorHighlighted = new Color(1, 0.57f, 0.4f);
public Color anchorSelected = Color.white;
[Header("Control Colours")]
public Color control = new Color(0.35f, 0.6f, 1, 0.85f);
public Color controlHighlighted = new Color(0.8f, 0.67f, 0.97f);
public Color controlSelected = Color.white;
public Color handleDisabled = new Color(1, 1, 1, 0.2f);
public Color controlLine = new Color(0, 0, 0, 0.35f);
[Header("Bezier Path Colours")]
public Color bezierPath = Color.green;
public Color highlightedPath = new Color(1, 0.6f, 0);
public Color bounds = new Color(1, 1, 1, .4f);
public Color segmentBounds = new Color(1, 1, 1, .4f);
[Header("Vertex Path Colours")]
public Color vertexPath = Color.white;
[Header("Normals")]
public Color normals = Color.yellow;
[Range(0,1)]
public float normalsLength = .1f;
#if UNITY_EDITOR
public static GlobalDisplaySettings Load() {
string[] guids = UnityEditor.AssetDatabase.FindAssets("t:GlobalDisplaySettings");
if (guids.Length == 0)
{
Debug.LogWarning("Could not find DisplaySettings asset. Will use default settings instead.");
return ScriptableObject.CreateInstance<GlobalDisplaySettings>();
}
else
{
string path = UnityEditor.AssetDatabase.GUIDToAssetPath(guids[0]);
return UnityEditor.AssetDatabase.LoadAssetAtPath<GlobalDisplaySettings>(path);
}
}
#endif
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 46d5e8d803e252f4499b52e657f8e1a2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,21 @@
using UnityEngine;
namespace PathCreation {
public class MinMax3D {
public Vector3 Min { get; private set; }
public Vector3 Max { get; private set; }
public MinMax3D()
{
Min = Vector3.one * float.MaxValue;
Max = Vector3.one * float.MinValue;
}
public void AddValue(Vector3 v)
{
Min = new Vector3(Mathf.Min(Min.x, v.x), Mathf.Min(Min.y,v.y), Mathf.Min(Min.z,v.z));
Max = new Vector3(Mathf.Max(Max.x, v.x), Mathf.Max(Max.y,v.y), Mathf.Max(Max.z,v.z));
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 194e1b7893dcbf940a71eb507d8b10f3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

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