# Shared AR Session tutorial error

**URL:** <https://community.nianticspatial.com/t/shared-ar-session-tutorial-error/2548>\
**Category:** I'm Stuck\
**Created:** [August 24, 2022, 9:36pm UTC](https://community.nianticspatial.com/t/shared-ar-session-tutorial-error/2548 "2022-08-24T21:36:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luke\_Ryberg](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@Luke\_Ryberg](https://community.nianticspatial.com/u/Luke_Ryberg)\
**Post date:** [August 24, 2022, 9:36pm UTC](https://community.nianticspatial.com/t/shared-ar-session-tutorial-error/2548/1 "2022-08-24T21:36:00Z")

</div>

_Include the following details (edit as applicable):_

- **Issue category** : Shared AR Session
- **Device type & OS version** : n/a
- **Host machine & OS version** : Windows 11
- **Issue Environment** : Unity
- **Xcode version** : n/a
- **ARDK version** : latest
- **Unity version** : 2021.3.8f1

Description of the issue:

In tutorial

> **[Shared AR Session & Plane Tracking](https://lightship.dev/guides/shared-ar-session-plane-tracking/#Step%202:%20Adding%20ARNetworkingSceneManager)**
>
> Enable users to create objects and share them in their spaces in real time with shared AR and plane detection. (Intermediate)

[![](https://us1.discourse-cdn.com/niantic/original/2X/c/cc923b0f3430618f4b93a89cd20bf574f0d86c9d.jpeg "Intermediate Tutorial: Shared AR Session & Plane Tracking with Niantic Lightship") ](https://www.youtube.com/watch?v=qdyDyUUhSDg)

At 5:58 approximately, this line does not work:

```auto
manager.NetworkSessionManager.Networking.Connected += OnNetworkInitialized;

```

I am assuming it is a namespace issue, I have the following:

```auto
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

using Niantic.ARDK.Extensions;
using Niantic.ARDK.Networking.MultipeerNetworkingEventArgs;
using System.Linq;

public class ARGameLogic : MonoBehaviour
{
    public ARNetworkingManager manager;

    // Start is called before the first frame update
    void Start()
    {
        manager.NetworkSessionManager.Networking.Connected += OnNetworkInitialized;
    }

    void OnNetworkInitialized(ConnectedArgs) 
    { 
        
    }
    // Update is called once per frame
    void Update()
    {
        
    }
}

```

---

<div class="post-metadata">

**Author:** ![Luke\_Ryberg](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@Luke\_Ryberg](https://community.nianticspatial.com/u/Luke_Ryberg)\
**Post date:** [August 24, 2022, 9:37pm UTC](https://community.nianticspatial.com/t/shared-ar-session-tutorial-error/2548/2 "2022-08-24T21:37:49Z")

</div>

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![Jesus\_Niantic](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@Jesus\_Niantic](https://community.nianticspatial.com/u/Jesus_Niantic)\
**Post date:** [August 25, 2022, 12:37am UTC](https://community.nianticspatial.com/t/shared-ar-session-tutorial-error/2548/3 "2022-08-25T00:37:10Z")

</div>

Hello Luke,

Would you be able to provide a screenshot or copy paste the error message? I was able to run through the example without an issue.

The one problem I do see in the code that you provided is that the OnNetworkInitialized function does not have a variable named for its ConnectedArgs field.

Yours just says `(ConnectedArgs)`, but it should say `(ConnectedArgs args)`

---

<div class="post-metadata">

**Author:** ![Luke\_Ryberg](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@Luke\_Ryberg](https://community.nianticspatial.com/u/Luke_Ryberg)\
**Post date:** [August 25, 2022, 5:50pm UTC](https://community.nianticspatial.com/t/shared-ar-session-tutorial-error/2548/4 "2022-08-25T17:50:13Z")

</div>

Yep fixed that, still the same issue.

---

<div class="post-metadata">

**Author:** ![Jesus\_Niantic](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@Jesus\_Niantic](https://community.nianticspatial.com/u/Jesus_Niantic)\
**Post date:** [August 25, 2022, 11:20pm UTC](https://community.nianticspatial.com/t/shared-ar-session-tutorial-error/2548/5 "2022-08-25T23:20:47Z")

</div>

Hi Luke,

I ran the tutorial again a second time up until the time stamp you provided and I also ran through the text version of the tutorial below the video and I am not running into any sort of issues when getting to that line. I don’t see any errors in the Unity Editor nor do I see any errors in my text editor (VS Code)

I would like to ask some clarifying questions:

1. Is there a visible red squiggly line below that line of code indicating an error? If so, can you please provide a screenshot or copy paste the error in your next reply?
2. If there is no red squiggly line to indicate an error, where are you seeing this error/ how are you finding out about it? Is it through the Debug Console? If so, can you please copy and paste the error here or send a screenshot?

Can you try the following:

1. Check the Inspector of the ARGame GameObject that you created in the tutorial to make sure that you added the ARNetworkingSceneManager into the public Manager field. If all that is accounted for, try step 2.
2. Add a second semicolon at the end of any line of code (essentially a blank statement) to force the editor to recompile the script and check if the error goes away. You can also try closing and reopening Unity or switching scenes and switching back (I have seen this remove errors that sometimes linger in the Console)
3. Close your Unity project, navigate to the folder where it’s located in your computer and delete the Library folder. Start your project back up and let it rebuild the Library folder and then check to see if that line is now recognized.
4. If the above didn’t work, delete ARDK, redownload it and re-import it

---

<div class="post-metadata">

**Author:** ![Luke\_Ryberg](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@Luke\_Ryberg](https://community.nianticspatial.com/u/Luke_Ryberg)\
**Post date:** [August 26, 2022, 9:58pm UTC](https://community.nianticspatial.com/t/shared-ar-session-tutorial-error/2548/6 "2022-08-26T21:58:48Z")

</div>

The issue appears to be an issue with VS and Unity communicating. I switched to VS Code, and that seems to solve the errors.

Thank you for the help.

---

<div class="post-metadata">

**Author:** ![Maverick\_Niantic](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Maverick\_Niantic](https://community.nianticspatial.com/u/Maverick_Niantic)\
**Post date:** [March 5, 2026, 11:50pm UTC](https://community.nianticspatial.com/t/shared-ar-session-tutorial-error/2548/7 "2026-03-05T23:50:05Z")

</div>

Closed on March 5, 2026, 11:50pm UTC

Age
