public Object getResource(String name) {
		ResourceHandle handle = this.resourceMap.get(name);
		if (handle == null) {
			throw new RuntimeException("unknown resource " + name);
		}
		
		if (!handle.isLoaded()) {
			try {
				handle.load(getCore());
				this.logger.logDebug(LOGGING_SOURCE, "loaded resource on demand " + this.invResourceMap.get(handle));
			} catch (ResourceException e) {
				this.logger.logWarning(LOGGING_SOURCE, "unable to load resource: " + e.getMessage());
			}
		}
		
		return handle.getResource();
	}