🪝useReneVerse
The useReneVerse hook is your go-to for handling Smart Ad logic in Phaser 3.
📥 getAdSurfaces()
import { PhaserHooks } from "@reneverse/rene-sdk-phaser";
function App() {
// Initialize PhaserHooks with API Key and Private Key for ReneVerse
const phaserHooks = new PhaserHooks({
apiKey: '<YOUR API KEY>',
privateKey: '<YOUR PRIVATE KEY>',
});
const getAdSurfaces = async () => {
// Fetch all Ad surfaces configured in your game on the ReneVerse portal
const adSurfaces = await phaserHooks.useReneVerse().getAdSurfaces();
console.log(adSurfaces);
}
// Creating a button to call the getAdSurfaces function
return (
<div>
<button onClick={getAdSurfaces}>
Get Ad Surfaces
</button>
</div>
);
}
export default App;Returns
🎯 getAd()
Returns
👁️ trackAdSingle()
Returns
👀 trackAdMultiple()
Returns
Last updated

