Reflexil addon can inject classes, methods, fields, structs, etc and inject c# code as well.
Care to elaborate on that ? I'm kinda sick of using titanium to inject my dll files
Originally Posted by wouterkabouterlol
While you're at it, is there any way to get a NetworkPlayer by only his name ?
I don't understand why this works fine:
Code:
Player[] players = UnityEngine.Object.FindObjectsOfType(typeof(Player)) as Player[];
But this doesn't compile ? :
Code:
NetworkUser[] users = UnityEngine.Object.FindObjectsOfType(typeof(NetworkUser)) as NetworkUser[];
Network users isn't derived from Monobehavior therefore you cannot get them how you are trying here.
Originally Posted by Kunii
Free thanks for you. (Miss clicked)
You can't inject with .Net Reflector, but you can reprogram parts of it to your liking.
Originally Posted by wouterkabouterlol
Care to elaborate on that ? I'm kinda sick of using titanium to inject my dll files
use the reflexil .net addin with reflector or justdecompile and you can inject code and whatnot. inject whatever changes you want and save the DLL
Originally Posted by zths
here is my code。。。
Code:
int num = 0;
FieldInfo[] fis = typeof(NetworkUser).GetFields();
foreach (NetworkUser nu in list)
{
new Log("NetworkUser:" + num);
foreach (FieldInfo fi in fis)
{
new Log("FieldType:" + fi.FieldType.Name + " FieldName" + fi.Name);
try
{
new Log("FieldValue:" + fi.GetValue(nu).ToString() + "\n");
}
catch (Exception e)
{
new Log("Get FieldValue Failure:" + e.Message + "\n");
}
}
num++;
}
What is "list" defined as?
foreach (NetworkUser nu in list)
Originally Posted by *******
What is "list" defined as?
foreach (NetworkUser nu in list)
Code:
NetworkUser[] list
I thought that one would be obvious
Originally Posted by *******
What is "list" defined as?
foreach (NetworkUser nu in list)
Originally Posted by Kunii
Code:
NetworkUser[] list
I thought that one would be obvious
Code:
Player[] players = Helper.getPlayers();
List<NetworkUser> list = new List<NetworkUser>();
foreach (Player p in players)
{
list.Add(NetworkUserList.getUserFromPlayer(p.networkView.owner));
}
Anyone know if it's possible to find group chat messages ?
I can find public messages fine but group messages seem to be unfindable even for the host
Nvm... it's impossible. Players don't even get the data from other groups sent to them
Originally Posted by Kunii
Code:
NetworkUser[] list
I thought that one would be obvious
You realize that is an empty array so that code would be iterating out of an empty array.
2/10 Stupid troll attempt by garbage coder.
Originally Posted by *******
You realize that is an empty array so that code would be iterating out of an empty array.
2/10 Stupid troll attempt by garbage coder.
Actually he answered the question, partly. He asked what list is defined as, its a NetworkUser array..
Originally Posted by Blueblood1
Actually he answered the question, partly. He asked what list is defined as, its a NetworkUser array..
Actually you are wrong. In zths' code its a List object not an array.
- Version: 2.2.4
- Get your Life/Inventory/Skills/...
- References: UnityEngine.dll
Code:
public static T getMine<T>()
where T : UnityEngine.Component
{
foreach (T obj in UnityEngine.Object.FindObjectsOfType<T>())
{
if (obj.networkView.isMine)
return obj;
}
return null;
}
Originally Posted by Fowl3628800
- Version: 2.2.4
- Get your Life/Inventory/Skills/...
- References: UnityEngine.dll
Code:
public static T getMine<T>()
where T : UnityEngine.Component
{
foreach (T obj in UnityEngine.Object.FindObjectsOfType<T>())
{
if (obj.networkView.isMine)
return obj;
}
return null;
}
Why are you using such a memory intensive way of getting this?
Originally Posted by Trollaux
Why are you using such a memory intensive way of getting this?
What would be a less memory intensive way?
I got a stupid question guys, how to make the Item Spawner hack? I am new to making a hack so please help if you can