public RuntimeCrossSceneReference( UniqueObject from, string fromField, UniqueObject to )
		{
			_fromObject = from;
			_fromField = fromField;
			_toObject = to;

			_fromObjectCached = null;
			_toObjectCached = null;
		}
		public RuntimeCrossSceneReference( UniqueObject from, string fromField, UniqueObject to )
		{
			_fromObject = from;
			_fromField = fromField;
			_toObject = to;

			_fromObjectCached = null;
			_toObjectCached = null;
		}
Exemple #3
0
		public RuntimeCrossSceneReference( Object from, string fromField, UniqueObject to, List<GenericData> data )
		{
			DEPRECATED_fromObject = new UniqueObject();

			_sourceObject = from;
			_sourceField = fromField;
			_toObject = to;
			_data = new GenericDataBundle() { data = data };

			_toObjectCached = null;
		}
        /// <summary>
        /// See if two UniqueObjects point to the same Object
        /// </summary>
        public override bool Equals(object obj)
        {
            if (!(obj is UniqueObject))
            {
                return(base.Equals(obj));
            }

            UniqueObject other = (UniqueObject)obj;

            if (!scene.Equals(other.scene))
            {
                return(false);
            }

            if (this.editorLocalId == other.editorLocalId)
            {
                return(true);
            }

            return((this.componentIndex == other.componentIndex) && (this.componentName == other.componentName) && (this.fullPath == other.fullPath));
        }