edited August 2018 in ORK Support
Hello everyone, am having challenges calling a function for unlocking steam achievement using ork events. Am not quite sure why the function is not been called, but am sure that other nodes of the event are properly set up and working. Below is the set up for my
call function node;
Component name SteamAchievements
Is static unchecked
Target object
Object Actor
Actor Scene object
Function name UnlockAchievement

Event setting
Type Object
Event object unchecked
Find object unchecked
Use scene object checked
Set name unchecked


Then here is the script am trying to call the function
SteamAchievements

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Steamworks;

public class SteamAchievements : MonoBehaviour {

public static SteamAchievements script;



// Use this for initialization
void Start ()
{
script = this;

if (!SteamManager.Initialized)
{
return;

}


}



public void UnlockSteamAchievement (string ID)
{

SteamUserStats.SetAchievement (ID);

SteamUserStats.StoreStats ();

}



void UnlockAchievement ()
{
UnlockSteamAchievement ("NEW_ACHIEVEMENT_1_0");
}



Then in the scene, i created an empty game object i called steam achievement and added my SteamAchievements script to it. Created another empty game object and added the event that calls the UnlockAchievement function. Then under the actor setting, of the event, i selected the game object of the SteamAchievement script,

Also note that the steam manager was initialized on the first scene, seems to be working, ut the achievement function doesn't seems to be called through the event node
Post edited by gamingislove on
  • Try changing
    void UnlockAchievement()
    to
    public void UnlockAchievement()
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.