Unity logo
取消
购物车
应用
Sell Assets

11000+款5星资源

8.5万+用户参与评分

10万+社区成员鼎力支持

每款资源都经过 Unity 审核

首页
工具
行为 AI
1/2
Ultimate A* Pathfinding Solution contains the necessary algorithm to apply A* pathfinding to any situation, whether the scene is made of tiles, colliders, nodes. 2D or 3D!
可编程渲染管线(SRP)兼容性
Unity可编程渲染管线(SRP)是让您能够通过C#脚本控制渲染的一个功能。SRP是支撑通用渲染管线(URP)和高清渲染管线(HDRP)的底层技术。
Unity版本内置渲染管线通用渲染管线(URP)高清渲染管线(HDRP)
2020.3.31f1
兼容
兼容
兼容
描述

This A* pathfinding solution contains Pathfinder class designed to fit any situations as long as the class is supplied with a method that calculates a heuristic approximation of distance between two nodes/points or any other objects, and a method that returns connected nodes/points or objects of same type and their distances as floats.

技术细节

Usage:


Pathfinder<T>() mypathfinder= new Pathfinder<Vector3>(HeuristicDistance, ConnectedNodesAndStepCosts,calculatorPatience);


mypathfinder.GenerateAstarPath( A, B, out path);


T: Any class or struct that has a way to measure distance between its instances. Examples are; Vector3, Vector2, Vector3Int etc. It can even be a custom class as long as there is a measurable distance between its instances.

HeuristicDistance: any method name that takes two T instances and returns an aproximate distance

ConnectedNodesAndStepCosts: any method name that takes a T instance and returns a dictionary of its neighbours as the keys and distances to the neighbours as the values.

calculatorPatience: the number of steps that the algorithm calculate before giving up. It is a safety precaution for testing. I advise starting with 100 or less and increasing to 9999 or more after testing.

GenerateAstarPath: returns true if exists a path from starting instance to ending instance, and outputs a list of adjacently connected T instances that lead to the target (path).


Ultimate A* Pathfinding Solution

(11)
160 users have favourite this asset
(160)
$9.99
席位
1
更新的价格和增值税在结算时计算
58 views in the past week
退款政策
该资源受Unity资源商店退款政策约束。有关详细信息,请参见《最终用户许可协议》(EULA)中的第2.9.3节。
安全结账方式:
Supported payment methods: Visa, Mastercard, Maestro, Paypal, Amex
高品质资源
11000+款5星资源
深受用户信赖
8.5万+用户参与评分
强大的社区支持
10万+社区成员鼎力支持
Unity logo
语言
反馈
合作伙伴计划
合作伙伴
USD
EUR
Copyright © 2025 Unity Technologies
所有价格不包含税
USD
EUR