зеркало из https://github.com/xamarin/urho.git
fix #273 - GetBoneSafe doesn't accept StringHash
This commit is contained in:
Родитель
0bd658b95d
Коммит
f796bfc13b
|
@ -37,3 +37,5 @@ clang+llvm-3.7.0-x86_64-apple-darwin*
|
|||
project.lock.json
|
||||
/ProjectTemplates/SharpRealityVsix/ProjectTemplates
|
||||
/ProjectTemplates/VSIX/ProjectTemplates
|
||||
/Tests/Playgrounds/Playgrounds.NetCoreApp/CoreData.pak
|
||||
/Tests/Playgrounds/Playgrounds.NetCoreApp/Urho3D.log
|
||||
|
|
|
@ -8,7 +8,8 @@ namespace Urho {
|
|||
// have dangling pointers, we only surface the constructor that retains a copy
|
||||
// to the container
|
||||
|
||||
public partial class Skeleton {
|
||||
public partial class Skeleton
|
||||
{
|
||||
IntPtr handle;
|
||||
|
||||
[Preserve]
|
||||
|
@ -29,17 +30,19 @@ namespace Urho {
|
|||
}
|
||||
}
|
||||
|
||||
public BoneWrapper GetBoneSafe(String name)
|
||||
public BoneWrapper GetBoneSafe(StringHash nameHash)
|
||||
{
|
||||
Runtime.ValidateObject(this);
|
||||
unsafe
|
||||
{
|
||||
Bone* result = Skeleton_GetBone0(handle, new StringHash(name).Code);
|
||||
Bone* result = Skeleton_GetBone0(handle, nameHash.Code);
|
||||
if (result == null)
|
||||
return null;
|
||||
return new BoneWrapper(this, result);
|
||||
}
|
||||
}
|
||||
|
||||
public BoneWrapper GetBoneSafe(string name) => GetBoneSafe(new StringHash(name));
|
||||
}
|
||||
|
||||
public partial class AnimatedModel {
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace Playgrounds.NetCoreApp
|
|||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
throw new NotImplementedException("Not fully implemented yet, requires changes in Urho3D (FileSystem)");
|
||||
Console.WriteLine("Dir: " + Environment.CurrentDirectory);
|
||||
// the current directory is not "bin" ?? https://github.com/dotnet/project-system/issues/589
|
||||
// workaround:
|
||||
|
|
Загрузка…
Ссылка в новой задаче