- Home /
Access protected class from other script.
Hi, I'm using some script for one of my own projects from UFPS and would like to know how I would access the Inflictor below from another script with C, as I'm .js I'm not to sure with this, thanks.
protected class Inflictor
{
public Transform Transform = null;
public float DamageTime = 0.0f;
public Inflictor(Transform transform, float damageTime)
{
Transform = transform;
DamageTime = damageTime;
}
}
Answer by Kiwasi · Oct 11, 2014 at 08:42 AM
It can be done with reflection. But in reality you should just get your access modifiers right and call it public.
I ended up writing one .js converting the C scripts into one, and it does exactly what I needed ..
Your answer

Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Proper way to Pool Object - Can't acces due to protection level 1 Answer
Unable to access functions in java script from C# script 1 Answer
How to import the object from server to unity 2 Answers
Can someone help me fix my Javascript for Flickering Light? 6 Answers