public override void OnStart() { // Find the limited resource object from the target. If the resource is null then check the parent. if ((limitedResource = limitedResourceTransform.Value.GetComponent<LimitedResource>()) == null) { limitedResource = limitedResourceTransform.Value.parent.GetComponent<LimitedResource>(); } }
public override void OnStart() { // Find the limited resource object from the target. If the resource is null then check the parent. if ((limitedResource = limitedResourceTransform.Value.GetComponent <LimitedResource>()) == null) { limitedResource = limitedResourceTransform.Value.parent.GetComponent <LimitedResource>(); } }