Example #1
0
static ObjectID safe_get_instance_id(const Variant& p_v) {

	Object *o = p_v;
	if (o==NULL)
		return 0;
	else {

		REF r = p_v;
		if (r.is_valid()) {

			return r->get_instance_ID();
		} else {


			_ScriptDebuggerRemote_found_id=0;
			_ScriptDebuggerRemote_find=NULL;
			ObjectDB::debug_objects(_ScriptDebuggerRemote_debug_func);
			return _ScriptDebuggerRemote_found_id;

		}
	}
}
Example #2
0
void WeakRef::set_ref(const REF& p_ref) {

	ref=p_ref.is_valid() ? p_ref->get_instance_ID() : 0;
}