code optimization &new helper functions added / modified
- UnityCore namespace changed to UnityEngine - Object class is no longer a template. FindObjectOfType function set to template - Added LogComponents function. It helps us retrieve components from the target gameObject. - Added GetObjectName function to Object structure (same method is available in utils header) - Added ConvertToSystemString function. Converts const char to system.string (app::String)
This commit is contained in:
@@ -52,4 +52,12 @@ std::string il2cppi_to_string(Il2CppString* str) {
|
||||
std::string il2cppi_to_string(app::String* str) {
|
||||
return il2cppi_to_string(reinterpret_cast<Il2CppString*>(str));
|
||||
}
|
||||
app::String* ConvertToSystemString(const char* str)
|
||||
{
|
||||
Il2CppString* il2cpp_str = il2cpp_string_new(str);
|
||||
|
||||
app::String* system_string_str = reinterpret_cast<app::String*>(il2cpp_str);
|
||||
|
||||
return system_string_str;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user