mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Update Helper
Update Helper
This commit is contained in:
@@ -28,6 +28,7 @@ namespace TEngine.Runtime
|
||||
if (resourceHelper != null)
|
||||
{
|
||||
TResources.SetResourceHelper(resourceHelper);
|
||||
resourceHelper.gameObject.transform.SetParent(this.gameObject.transform);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -44,8 +44,8 @@ namespace TEngine.Runtime
|
||||
Log.Warning("Type '{0}' is not assignable from '{1}'.", typeof(T).FullName, helperType.FullName);
|
||||
return null;
|
||||
}
|
||||
|
||||
helper = (T)new GameObject().AddComponent(helperType);
|
||||
helper.name = helperTypeName;
|
||||
}
|
||||
else if (customHelper == null)
|
||||
{
|
||||
@@ -55,10 +55,12 @@ namespace TEngine.Runtime
|
||||
else if (customHelper.gameObject.InScene())
|
||||
{
|
||||
helper = index > 0 ? Object.Instantiate(customHelper) : customHelper;
|
||||
helper.name = customHelper.name;
|
||||
}
|
||||
else
|
||||
{
|
||||
helper = Object.Instantiate(customHelper);
|
||||
helper.name = customHelper.name;
|
||||
}
|
||||
|
||||
return helper;
|
||||
|
Reference in New Issue
Block a user