Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Is there a way to call overload function of Unity C# fun?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
mindoff
Advanced Cheater
Reputation: 0

Joined: 12 Jun 2016
Posts: 96

PostPosted: Thu Jul 14, 2016 8:32 pm    Post subject: Is there a way to call overload function of Unity C# fun? Reply with quote

CE can use MonoDataCollector to call function by name,
but If the function get same name such as

Code:

private void DetectAttackRange(Tile SourceTile, Tile TargetTile)
{
    this.Range = new List<Tile>();
    this.DetectAttackRange(this.CurrentSkill.dbf, SourceTile, TargetTile, this.Range);
}

private void DetectAttackRange(SkillDBF dbf, Tile SourceTile, Tile TargetTile, List<Tile> OutRange)
{
......
}


Then mono_symbolLookupCallback will always return the first one,and the first one is always not the one I need.

So Is there a way to loop all the function by name and chose which one to use?

Or maybe I find something in monoscript.lua called
mono_class_findMethodByDesc

don't know how it work.

What I need is If I know the function parameter like
private void DetectAttackRange(Tile SourceTile, Tile TargetTile)
and
private void DetectAttackRange(SkillDBF dbf, Tile SourceTile, Tile TargetTile, List<Tile> OutRange)

I need the second one,is there a way to judge or look for the function name by its parameter?

How If I can,could someone write a sample code about how to use,
take this
private void DetectAttackRange(SkillDBF dbf, Tile SourceTile, Tile TargetTile, List<Tile> OutRange)
for example.

Thanks


Last edited by mindoff on Sun Jul 17, 2016 9:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
mindoff
Advanced Cheater
Reputation: 0

Joined: 12 Jun 2016
Posts: 96

PostPosted: Sun Jul 17, 2016 8:58 pm    Post subject: Reply with quote

Up,someone please help,if ce can look for multi function by name,please show me how or some link to read,if ce cant,please let me know it cant,then i will try other way to do the cheating.

please someone dark byte or someone,help



image.jpg
 Description:
 Filesize:  137.53 KB
 Viewed:  6712 Time(s)

image.jpg


Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Jul 17, 2016 10:09 pm    Post subject: Reply with quote

http://forum.cheatengine.org/viewtopic.php?p=5659563#5659563
Back to top
View user's profile Send private message
mindoff
Advanced Cheater
Reputation: 0

Joined: 12 Jun 2016
Posts: 96

PostPosted: Mon Jul 18, 2016 3:05 am    Post subject: Reply with quote

Thanks for the reply,I got stopped at the last part.

If I test Unity built-in function such as

Code:

print(findMethodAddrBySignature('UnityEngine','Texture2D','SetPixels32','?', true))


It works,But if I test some custom script like

Code:

print(findMethodAddrBySignature('Assembly-CSharp','SkillSystem','DetectAttackRange','?', true))


It prints nothing,which means not found I guess.

And I tried other game,same result,why Assembly-CSharp.dll function can't be found correctly?

Do you guys success using that script to hack game of your own??
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 62

Joined: 01 Oct 2008
Posts: 961

PostPosted: Mon Jul 18, 2016 6:50 am    Post subject: Reply with quote

Hi,
'Assembly-CSharp' is assembly or image name.
If it seems there is no name space, try an empty string '' or "" in lua,
usually default namespace should be empty namespace.

For getter/setter property, a 'get_' or 'set_' should be prefixed.

In standard ce mono symbol, string separator character is ':'.
The 1st case should look like,
UnityEngine:Texture2D:SetPixels32 ,
2nd case might try,
SkillSystem:DetectAttackRange or
:SkillSystem:DetectAttackRange.
Longer namespace like
UnityEngine.UI.ExtensionsToggle.OnEnable
may look like,
UnityEngine.UI:ExtensionsToggle:OnEnable
Sometime a double quote may need, eg when following an offset.

bye~

_________________
- Retarded.
Back to top
View user's profile Send private message
mindoff
Advanced Cheater
Reputation: 0

Joined: 12 Jun 2016
Posts: 96

PostPosted: Wed Jul 20, 2016 9:08 pm    Post subject: Reply with quote

Thanks for the reply,figure it out.

It seems Assembly-CSharp does not have a namespace,so just leave it blank,and everything works. Very Happy

Code:

print(findMethodAddrBySignature('','SkillSystem','DetectAttackRange','?', true))
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites